Class AjAST
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompilationUnit
convertCompilationUnit(int level, CompilationUnitDeclaration compilationUnitDeclaration, char[] source, Map options, boolean isResolved, CompilationUnit workingCopy, org.eclipse.core.runtime.IProgressMonitor monitor)
Internal method.Creates an unparented after advice declaration node owned by this AST.Creates an unparented after returning advice declaration node owned by this AST.Creates an unparented after throwing advice declaration node owned by this AST.static AjAST
newAjAST(int level, boolean previewEnabled)
Creates a new AspectJ abstract syntax tree (AST) following the specified set of API rules.Creates an unparented ajtype declaration node owned by this AST.Creates an unparented AndPointcut node owned by this AST.Creates an unparented around advice declaration node owned by this AST.Creates an unparented aspect declaration node owned by this AST.Creates an unparented before advice declaration node owned by this AST.Creates an unparented CflowPointcut node owned by this AST.Creates an unparented declare at constructor declaration node owned by this AST.Creates an unparented declare at field declaration node owned by this AST.Creates an unparented declare at method declaration node owned by this AST.Creates an unparented declare at type declaration node owned by this AST.Creates an unparented declare error declaration node owned by this AST.Creates an unparented declare parents declaration node owned by this AST.Creates an unparented declare precedence declaration node owned by this AST.Creates an unparented declare soft declaration node owned by this AST.Creates an unparented declare warning declaration node owned by this AST.Creates an unparented default pointcut node owned by this AST.Creates an unparented default type pattern node owned by this AST.Creates a new unparented intertype field declaration node owned by this AST.Creates an unparented intertype method declaration node owned by this AST.Creates an unparented NotPointcut node owned by this AST.Creates an unparented OrPointcut node owned by this AST.Creates an unparented PerCflow node owned by this AST.Creates an unparented perobject node owned by this AST.Creates an unparented pertypewithin node owned by this AST.Creates an unparented pointcut declaration node owned by this AST.Creates an unparented reference pointcut node owned by this AST.Creates an unparented default signature pattern node owned by this AST.Methods inherited from class org.aspectj.org.eclipse.jdt.core.dom.AST
apiLevel, convertCompilationUnit, convertCompilationUnit, createInstance, createInstance, getJLSLatest, hasBindingsRecovery, hasResolvedBindings, hasStatementsRecovery, isPreviewEnabled, isPreviewEnabledSet, modificationCount, newAnnotationTypeDeclaration, newAnnotationTypeMemberDeclaration, newAnonymousClassDeclaration, newArrayAccess, newArrayCreation, newArrayInitializer, newArrayType, newArrayType, newAssertStatement, newAssignment, newAST, newAST, newAST, newBlock, newBlockComment, newBooleanLiteral, newBreakStatement, newCaseDefaultExpression, newCastExpression, newCatchClause, newCharacterLiteral, newClassInstanceCreation, newCompilationUnit, newConditionalExpression, newConstructorInvocation, newContinueStatement, newCreationReference, newDimension, newDoStatement, newEmptyStatement, newEnhancedForStatement, newEnumConstantDeclaration, newEnumDeclaration, newExportsStatement, newExpressionMethodReference, newExpressionStatement, newFieldAccess, newFieldDeclaration, newForStatement, newGuardedPattern, newIfStatement, newImportDeclaration, newInfixExpression, newInitializer, newInstanceofExpression, newIntersectionType, newJavadoc, newJavaDocRegion, newLabeledStatement, newLambdaExpression, newLineComment, newMarkerAnnotation, newMemberRef, newMemberValuePair, newMethodDeclaration, newMethodInvocation, newMethodRef, newMethodRefParameter, newModifier, newModifiers, newModuleDeclaration, newModuleModifier, newName, newName, newNameQualifiedType, newNormalAnnotation, newNullLiteral, newNullPattern, newNumberLiteral, newNumberLiteral, newOpensDirective, newPackageDeclaration, newParameterizedType, newParenthesizedExpression, newPatternInstanceofExpression, newPostfixExpression, newPrefixExpression, newPrimitiveType, newProvidesDirective, newQualifiedName, newQualifiedType, newRecordDeclaration, newRequiresDirective, newReturnStatement, newSimpleName, newSimpleType, newSingleMemberAnnotation, newSingleVariableDeclaration, newStringLiteral, newSuperConstructorInvocation, newSuperFieldAccess, newSuperMethodInvocation, newSuperMethodReference, newSwitchCase, newSwitchExpression, newSwitchStatement, newSynchronizedStatement, newTagElement, newTagProperty, newTextBlock, newTextElement, newThisExpression, newThrowStatement, newTryStatement, newTypeDeclaration, newTypeDeclarationStatement, newTypeDeclarationStatement, newTypeLiteral, newTypeMethodReference, newTypeParameter, newTypePattern, newUnionType, newUsesDirective, newVariableDeclarationExpression, newVariableDeclarationFragment, newVariableDeclarationStatement, newWhileStatement, newWildcardType, newYieldStatement, parseCompilationUnit, parseCompilationUnit, parseCompilationUnit, parseCompilationUnit, resolveWellKnownType
-
Method Details
-
newAjAST
Creates a new AspectJ abstract syntax tree (AST) following the specified set of API rules.Clients should use this method specifing
AST.JLS3
as the AST level in all cases, even when dealing with JDK 1.3 or 1.4..- Parameters:
level
- the API level; one of the LEVEL constants- Returns:
- new AST instance following the specified set of API rules.
- Throws:
IllegalArgumentException
- if:- the API level is not one of the LEVEL constants
- Since:
- 3.0
-
convertCompilationUnit
public static CompilationUnit convertCompilationUnit(int level, CompilationUnitDeclaration compilationUnitDeclaration, char[] source, Map options, boolean isResolved, CompilationUnit workingCopy, org.eclipse.core.runtime.IProgressMonitor monitor)Internal method.This method converts the given internal compiler AST for the given source string into a compilation unit. This method is not intended to be called by clients.
- Parameters:
level
- the API level; one of the LEVEL constantscompilationUnitDeclaration
- an internal AST node for a compilation unit declarationsource
- the string of the Java compilation unitoptions
- compiler optionsworkingCopy
- the working copy that the AST is created frommonitor
- the progress monitor used to report progress and request cancelation, ornull
if noneisResolved
- whether the given compilation unit declaration is resolved- Returns:
- the compilation unit node
-
newAspectDeclaration
Creates an unparented aspect declaration node owned by this AST. The name of the aspect is an unspecified, but legal, name; no modifiers; no doc comment; no superclass or superinterfaces; an empty body; a null perclause; and is not privilegedTo set the perclause, use this method and then call
AspectDeclaration.setPerClause(ASTNode)
.To create a privileged aspect, use this method and then call
AspectDeclaration.setPrivileged(true)
.- Returns:
- a new unparented aspect declaration node
-
newAjTypeDeclaration
Creates an unparented ajtype declaration node owned by this AST. The name of the class is an unspecified, but legal, name; no modifiers; no doc comment; no superclass or superinterfaces; and an empty body.To create an aspect, use this method and then call
AjTypeDeclaration.setAspect(true)
.- Returns:
- a new unparented ajtype declaration node
-
newAfterAdviceDeclaration
Creates an unparented after advice declaration node owned by this AST. By default, the declaration is for an after advice with no pointcut; no doc comment; and no body (as opposed to an empty body).- Returns:
- a new unparented after advice declaration node
-
newAfterReturningAdviceDeclaration
Creates an unparented after returning advice declaration node owned by this AST. By default, the declaration is for an after returning advice with no pointcut; no doc comment; no return value and no body (as opposed to an empty body).- Returns:
- a new unparented after returning advice declaration node
-
newAfterThrowingAdviceDeclaration
Creates an unparented after throwing advice declaration node owned by this AST. By default, the declaration is for an after throwing advice with no pointcut; no doc comment; no throwing value and no body (as opposed to an empty body).- Returns:
- a new unparented after throwing advice declaration node
-
newBeforeAdviceDeclaration
Creates an unparented before advice declaration node owned by this AST. By default, the declaration is for a before advice with no pointcut; no doc comment; and no body (as opposed to an empty body).- Returns:
- a new unparented before advice declaration node
-
newAroundAdviceDeclaration
Creates an unparented around advice declaration node owned by this AST. By default, the declaration is for an around advice with no pointcut; no doc comment; no return type; and no body (as opposed to an empty body).- Returns:
- a new unparented around advice declaration node
-
newDeclareAtConstructorDeclaration
Creates an unparented declare at constructor declaration node owned by this AST. By default, the declaration is for a declare annotation with no doc comment; no pattern node; no annotation name; and no declare kind.- Returns:
- a new unparented declare at constructor declaration node
- Throws:
UnsupportedOperationException
- if this operation is used in a JLS2 AST
-
newDeclareAtFieldDeclaration
Creates an unparented declare at field declaration node owned by this AST. By default, the declaration is for a declare annotation with no doc comment; no pattern node; no annotation name; and no declare kind.- Returns:
- a new unparented declare at field declaration node
- Throws:
UnsupportedOperationException
- if this operation is used in a JLS2 AST
-
newDeclareAtMethodDeclaration
Creates an unparented declare at method declaration node owned by this AST. By default, the declaration is for a declare annotation with no doc comment; no pattern node; no annotation name; and no declare kind.- Returns:
- a new unparented declare at method declaration node
- Throws:
UnsupportedOperationException
- if this operation is used in a JLS2 AST
-
newDeclareAtTypeDeclaration
Creates an unparented declare at type declaration node owned by this AST. By default, the declaration is for a declare annotation with no doc comment; no pattern node; no annotation name; and no declare kind.- Returns:
- a new unparented declare at type declaration node
- Throws:
UnsupportedOperationException
- if this operation is used in a JLS2 AST
-
newDeclareErrorDeclaration
Creates an unparented declare error declaration node owned by this AST. By default, the declaration is for a declare error with no doc comment; no pointcut; and no message.- Returns:
- a new unparented declare error declaration node
-
newDeclareParentsDeclaration
Creates an unparented declare parents declaration node owned by this AST. By default, the declaration is for a declare parents which is implements; with no doc comment; no child type pattern; and no parent type patternTo create an extends declare parents, use this method and then call
DeclareParentsDeclaration.setExtends(true)
.- Returns:
- a new unparented declare parents declaration node
-
newDeclarePrecedenceDeclaration
Creates an unparented declare precedence declaration node owned by this AST. By default, the declaration is for a declare precedence with no doc comment; and no type pattern list.- Returns:
- a new unparented declare precedence declaration node
-
newDeclareSoftDeclaration
Creates an unparented declare soft declaration node owned by this AST. By default, the declaration is for a declare soft with no doc comment; no pointcut; and no type pattern.- Returns:
- a new unparented declare soft declaration node
-
newDeclareWarningDeclaration
Creates an unparented declare warning declaration node owned by this AST. By default, the declaration is for a declare warning with no doc comment; no pointcut; and no message.- Returns:
- a new unparented declare warning declaration node
-
newInterTypeFieldDeclaration
Creates a new unparented intertype field declaration node owned by this AST. By default, there are no modifiers, no doc comment, and the base type is unspecified (but legal).- Returns:
- a new unparented intertype field declaration node
-
newInterTypeMethodDeclaration
Creates an unparented intertype method declaration node owned by this AST. By default, the declaration is for a method of an unspecified, but legal, name; no modifiers; no doc comment; no parameters; return type void; no extra array dimensions; no thrown exceptions; and no body (as opposed to an empty body).- Returns:
- a new unparented inter type method declaration node
-
newPointcutDeclaration
Creates an unparented pointcut declaration node owned by this AST. By default, the declaration is for a pointcut of an unspecified, but legal, name; no modifiers; no doc comment; and no pointcut designator- Returns:
- a new unparented pointcut declaration node
-
newAndPointcut
Creates an unparented AndPointcut node owned by this AST. By default, the declaration is for an and pointcut with no left or right pointcut designators- Returns:
- a new unparented AndPointcut node
-
newCflowPointcut
Creates an unparented CflowPointcut node owned by this AST. By default, the declaration is for a cflow pointcut with no body pointcut designator- Returns:
- a new unparented CflowPointcut node
-
newNotPointcut
Creates an unparented NotPointcut node owned by this AST. By default, the declaration is for a not pointcut with no body pointcut designator- Returns:
- a new unparented NotPointcut node
-
newOrPointcut
Creates an unparented OrPointcut node owned by this AST. By default, the declaration is for an or pointcut with no left or right pointcut designators- Returns:
- a new unparented OrPointcut node
-
newPerCflow
Creates an unparented PerCflow node owned by this AST. By default, the declaration is for a percflow with no body pointcut designator- Returns:
- a new unparented percflow node
-
newPerObject
Creates an unparented perobject node owned by this AST. By default, the declaration is for a perobject with no body pointcut designator- Returns:
- a new unparented perobject node
-
newPerTypeWithin
Creates an unparented pertypewithin node owned by this AST. By default, the declaration is for a pertypewithin- Returns:
- a new unparented pertypewithin node
-
newReferencePointcut
Creates an unparented reference pointcut node owned by this AST. By default, the declaration is for a reference pointcut with no name- Returns:
- a new unparented reference pointcut node
-
newDefaultPointcut
Creates an unparented default pointcut node owned by this AST. By default, the declaration is for a default pointcut with an empty detail string.To edit the detail string, use this method and then call
DefaultPointcut.setDetail("newString")
.- Returns:
- a new unparented default pointcut node
-
newDefaultTypePattern
Creates an unparented default type pattern node owned by this AST. By default, the declaration is for a default type pattern with an empty detail string.To edit the detail string, use this method and then call
DefaultTypePattern.setDetail("newString")
.- Returns:
- a new unparented default type pattern node
-
newSignaturePattern
Creates an unparented default signature pattern node owned by this AST. By default, the declaration is for a default signature pattern with an empty detail string.To edit the detail string, use this method and then call
SignaturePattern.setDetail("newString")
.- Returns:
- a new unparented default signature pattern node
-