java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.dom.util.DOMASTUtil

public class DOMASTUtil extends Object
  • Konstruktordetails

    • DOMASTUtil

      public DOMASTUtil()
  • Methodendetails

    • isFeatureSupportedinAST

      public static boolean isFeatureSupportedinAST(AST ast, int featureName)
      Validates if the given apiLevel and previewEnabled supports the provided nodeType. This API checks for node types supported from JLS 14 onwards and will return true> for nodes added before JLS14.
      Parameter:
      ast - the AST to be evaluated
      featureName - the feature name constant indicating the feature to be evaluated
      Gibt zurück:
      true if the given AST supports the provided nodeType else false
      Seit:
      3.22
      Siehe auch:
    • isFeatureSupportedinAST

      public static boolean isFeatureSupportedinAST(int apiLevel, boolean previewEnabled, int featureName)
      Validates if the given apiLevel and previewEnabled supports the provided nodeType. This API checks for node types supported from JLS 14 onwards and will return true> for nodes added before JLS14.
      Parameter:
      apiLevel - the level to be checked
      previewEnabled - the preview feature to be considered
      featureName - the feature name constant indicating the feature to be evaluated
      Gibt zurück:
      true if the given AST supports the provided nodeType else false
      Seit:
      3.22
      Siehe auch:
    • isFeatureSupportedinAST

      public static boolean isFeatureSupportedinAST(int apiLevel, int featureName)
      Validates if the given apiLevel and previewEnabled supports the provided nodeType. This API checks for node types supported from JLS 14 onwards and will return true> for nodes added before JLS14.
      Parameter:
      apiLevel - the level to be checked
      featureName - the feature name constant indicating the feature to be evaluated
      Gibt zurück:
      true if the given AST supports the provided nodeType else false
      Seit:
      3.27
      Siehe auch:
    • isPreviewEnabled

      public static boolean isPreviewEnabled(int apiLevel, boolean previewEnabled)
    • isSwitchExpressionSupported

      public static boolean isSwitchExpressionSupported(AST ast)
    • isYieldStatementSupported

      public static boolean isYieldStatementSupported(AST ast)
    • isTextBlockSupported

      public static boolean isTextBlockSupported(AST ast)
    • isRecordDeclarationSupported

      public static boolean isRecordDeclarationSupported(AST ast)
    • isRecordDeclarationSupported

      public static boolean isRecordDeclarationSupported(int apiLevel)
    • isPatternInstanceofExpressionSupported

      public static boolean isPatternInstanceofExpressionSupported(AST ast)
    • isPatternSupported

      public static boolean isPatternSupported(AST ast)
    • isPatternSupported

      public static boolean isPatternSupported(int apiLevel, boolean previewEnabled)
    • isJavaDocCodeSnippetSupported

      public static boolean isJavaDocCodeSnippetSupported(int apiLevel)
    • checkASTLevel

      public static void checkASTLevel(int level)
    • getCompliance

      public static String getCompliance(int astLevel)
      Calculates the JavaCore Option value string corresponding to the input ast level. AST Level 4 is used for Java versions 1.4 to 1.7 and is converted to compliance level 7 if input ast level is out of boundary, latest compliance will be returned
      Parameter:
      astLevel -
      Gibt zurück:
      JavaCore Option value string corresponding to the ast level