Klasse AjAST

java.lang.Object
org.aspectj.org.eclipse.jdt.core.dom.AST
org.aspectj.org.eclipse.jdt.core.dom.AjAST

public class AjAST extends AST
  • Methodendetails

    • newAjAST

      public static AjAST newAjAST(int level, boolean previewEnabled)
      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..

      Parameter:
      level - the API level; one of the LEVEL constants
      Gibt zurück:
      new AST instance following the specified set of API rules.
      Löst aus:
      IllegalArgumentException - if:
      • the API level is not one of the LEVEL constants
      Seit:
      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.

      Parameter:
      level - the API level; one of the LEVEL constants
      compilationUnitDeclaration - an internal AST node for a compilation unit declaration
      source - the string of the Java compilation unit
      options - compiler options
      isResolved - whether the given compilation unit declaration is resolved
      workingCopy - the working copy that the AST is created from
      monitor - the progress monitor used to report progress and request cancelation, or null if none
      Gibt zurück:
      the compilation unit node
    • newAspectDeclaration

      public AspectDeclaration 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 privileged

      To 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).

      Gibt zurück:
      a new unparented aspect declaration node
    • newAjTypeDeclaration

      public AjTypeDeclaration 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).

      Gibt zurück:
      a new unparented ajtype declaration node
    • newAfterAdviceDeclaration

      public AfterAdviceDeclaration 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).
      Gibt zurück:
      a new unparented after advice declaration node
    • newAfterReturningAdviceDeclaration

      public AfterReturningAdviceDeclaration 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).
      Gibt zurück:
      a new unparented after returning advice declaration node
    • newAfterThrowingAdviceDeclaration

      public AfterThrowingAdviceDeclaration 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).
      Gibt zurück:
      a new unparented after throwing advice declaration node
    • newBeforeAdviceDeclaration

      public BeforeAdviceDeclaration 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).
      Gibt zurück:
      a new unparented before advice declaration node
    • newAroundAdviceDeclaration

      public AroundAdviceDeclaration 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).
      Gibt zurück:
      a new unparented around advice declaration node
    • newDeclareAtConstructorDeclaration

      public DeclareAtConstructorDeclaration 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.
      Gibt zurück:
      a new unparented declare at constructor declaration node
      Löst aus:
      UnsupportedOperationException - if this operation is used in a JLS2 AST
    • newDeclareAtFieldDeclaration

      public DeclareAtFieldDeclaration 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.
      Gibt zurück:
      a new unparented declare at field declaration node
      Löst aus:
      UnsupportedOperationException - if this operation is used in a JLS2 AST
    • newDeclareAtMethodDeclaration

      public DeclareAtMethodDeclaration 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.
      Gibt zurück:
      a new unparented declare at method declaration node
      Löst aus:
      UnsupportedOperationException - if this operation is used in a JLS2 AST
    • newDeclareAtTypeDeclaration

      public DeclareAtTypeDeclaration 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.
      Gibt zurück:
      a new unparented declare at type declaration node
      Löst aus:
      UnsupportedOperationException - if this operation is used in a JLS2 AST
    • newDeclareErrorDeclaration

      public DeclareErrorDeclaration 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.
      Gibt zurück:
      a new unparented declare error declaration node
    • newDeclareParentsDeclaration

      public DeclareParentsDeclaration 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 pattern

      To create an extends declare parents, use this method and then call DeclareParentsDeclaration.setExtends(true).

      Gibt zurück:
      a new unparented declare parents declaration node
    • newDeclarePrecedenceDeclaration

      public DeclarePrecedenceDeclaration 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.
      Gibt zurück:
      a new unparented declare precedence declaration node
    • newDeclareSoftDeclaration

      public DeclareSoftDeclaration 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.
      Gibt zurück:
      a new unparented declare soft declaration node
    • newDeclareWarningDeclaration

      public DeclareWarningDeclaration 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.
      Gibt zurück:
      a new unparented declare warning declaration node
    • newInterTypeFieldDeclaration

      public InterTypeFieldDeclaration 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).
      Gibt zurück:
      a new unparented intertype field declaration node
    • newInterTypeMethodDeclaration

      public InterTypeMethodDeclaration 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).
      Gibt zurück:
      a new unparented inter type method declaration node
    • newPointcutDeclaration

      public PointcutDeclaration 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
      Gibt zurück:
      a new unparented pointcut declaration node
    • newAndPointcut

      public AndPointcut 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
      Gibt zurück:
      a new unparented AndPointcut node
    • newCflowPointcut

      public CflowPointcut newCflowPointcut()
      Creates an unparented CflowPointcut node owned by this AST. By default, the declaration is for a cflow pointcut with no body pointcut designator
      Gibt zurück:
      a new unparented CflowPointcut node
    • newNotPointcut

      public NotPointcut newNotPointcut()
      Creates an unparented NotPointcut node owned by this AST. By default, the declaration is for a not pointcut with no body pointcut designator
      Gibt zurück:
      a new unparented NotPointcut node
    • newOrPointcut

      public OrPointcut 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
      Gibt zurück:
      a new unparented OrPointcut node
    • newPerCflow

      public PerCflow newPerCflow()
      Creates an unparented PerCflow node owned by this AST. By default, the declaration is for a percflow with no body pointcut designator
      Gibt zurück:
      a new unparented percflow node
    • newPerObject

      public PerObject newPerObject()
      Creates an unparented perobject node owned by this AST. By default, the declaration is for a perobject with no body pointcut designator
      Gibt zurück:
      a new unparented perobject node
    • newPerTypeWithin

      public PerTypeWithin newPerTypeWithin()
      Creates an unparented pertypewithin node owned by this AST. By default, the declaration is for a pertypewithin
      Gibt zurück:
      a new unparented pertypewithin node
    • newReferencePointcut

      public ReferencePointcut newReferencePointcut()
      Creates an unparented reference pointcut node owned by this AST. By default, the declaration is for a reference pointcut with no name
      Gibt zurück:
      a new unparented reference pointcut node
    • newDefaultPointcut

      public DefaultPointcut 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").

      Gibt zurück:
      a new unparented default pointcut node
    • newDefaultTypePattern

      public DefaultTypePattern 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").

      Gibt zurück:
      a new unparented default type pattern node
    • newSignaturePattern

      public SignaturePattern 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").

      Gibt zurück:
      a new unparented default signature pattern node