Class AspectDeclaration

All Implemented Interfaces:
ReferenceContext, TypeConstants, TypeIds, ProblemSeverities

public class AspectDeclaration extends TypeDeclaration
Represents an aspect declaration.
Author:
PARC, Andy Clement
  • Field Details

    • perClause

      public PerClause perClause
    • aspectOfMethod

      public ResolvedMember aspectOfMethod
    • ptwGetWithinTypeNameMethod

      public ResolvedMember ptwGetWithinTypeNameMethod
    • hasAspectMethod

      public ResolvedMember hasAspectMethod
    • accessForInline

      public Map<ResolvedMember,​Binding> accessForInline
    • superAccessForInline

      public Map<ResolvedMember,​org.aspectj.ajdt.internal.compiler.ast.AccessForInlineVisitor.SuperAccessMethodPair> superAccessForInline
    • isPrivileged

      public boolean isPrivileged
    • concreteName

      public EclipseSourceType concreteName
    • typeX

      public ReferenceType typeX
    • factory

      public EclipseFactory factory
    • adviceCounter

      public int adviceCounter
    • declareCounter

      public int declareCounter
    • dominatesPattern

      public TypePattern dominatesPattern
    • HAS_ASPECT

      public static final char[] HAS_ASPECT
  • Constructor Details

    • AspectDeclaration

      public AspectDeclaration(CompilationResult compilationResult)
  • Method Details

    • isAbstract

      public boolean isAbstract()
    • resolve

      public void resolve()
      Overrides:
      resolve in class TypeDeclaration
    • checkSpec

      public void checkSpec(ClassScope scope)
    • addAtAspectJAnnotations

      public void addAtAspectJAnnotations()
      AMC - this method is called by the AtAspectJVisitor during beforeCompilation processing in the AjCompiler adapter. We use this hook to add in the @AspectJ annotations.
    • generateCode

      public void generateCode(ClassFile enclosingClassFile)
      Description copied from class: TypeDeclaration
      Generic bytecode generation for type
      Overrides:
      generateCode in class TypeDeclaration
    • needClassInitMethod

      public boolean needClassInitMethod()
      Description copied from class: TypeDeclaration
      A will be requested as soon as static fields or assertions are present. It will be eliminated during classfile creation if no bytecode was actually produced based on some optimizations/compiler settings.
      Overrides:
      needClassInitMethod in class TypeDeclaration
    • generateAttributes

      protected void generateAttributes(ClassFile classFile)
      Overrides:
      generateAttributes in class TypeDeclaration
    • makeEffectiveSignatureAttribute

      protected List<EclipseAttributeAdapter> makeEffectiveSignatureAttribute(ResolvedMember sig, Shadow.Kind kind, boolean weaveBody)
    • processIntertypeMemberTypes

      public void processIntertypeMemberTypes(ClassScope classScope)
    • buildInterTypeAndPerClause

      public void buildInterTypeAndPerClause(ClassScope classScope)
    • printHeader

      public StringBuffer printHeader(int indent, StringBuffer output)
      Overrides:
      printHeader in class TypeDeclaration
    • getDeclaredModifiers

      public int getDeclaredModifiers()
      All aspects are made public after type checking etc. and before generating code (so that the advice can be called!). This method returns the modifiers as specified in the original source code declaration so that the structure model sees the right thing.
    • getLocalTypeNameSuffix

      public char[] getLocalTypeNameSuffix()
      Overrides:
      getLocalTypeNameSuffix in class TypeDeclaration