Class AjcMemberMaker

java.lang.Object
org.aspectj.weaver.AjcMemberMaker

public class AjcMemberMaker extends Object
The AjcMemberMaker is responsible for creating the representations of methods/fields/etc that are placed in both aspects and affected target types. It uses the NameMangler class to create the actual names that will be used.
  • Field Details

    • CFLOW_STACK_TYPE

      public static final UnresolvedType CFLOW_STACK_TYPE
    • AROUND_CLOSURE_TYPE

      public static final UnresolvedType AROUND_CLOSURE_TYPE
    • CONVERSIONS_TYPE

      public static final UnresolvedType CONVERSIONS_TYPE
    • NO_ASPECT_BOUND_EXCEPTION

      public static final UnresolvedType NO_ASPECT_BOUND_EXCEPTION
    • ASPECT_ANNOTATION

      public static final UnresolvedType ASPECT_ANNOTATION
    • BEFORE_ANNOTATION

      public static final UnresolvedType BEFORE_ANNOTATION
    • AROUND_ANNOTATION

      public static final UnresolvedType AROUND_ANNOTATION
    • AFTERRETURNING_ANNOTATION

      public static final UnresolvedType AFTERRETURNING_ANNOTATION
    • AFTERTHROWING_ANNOTATION

      public static final UnresolvedType AFTERTHROWING_ANNOTATION
    • AFTER_ANNOTATION

      public static final UnresolvedType AFTER_ANNOTATION
    • POINTCUT_ANNOTATION

      public static final UnresolvedType POINTCUT_ANNOTATION
    • DECLAREERROR_ANNOTATION

      public static final UnresolvedType DECLAREERROR_ANNOTATION
    • DECLAREWARNING_ANNOTATION

      public static final UnresolvedType DECLAREWARNING_ANNOTATION
    • DECLAREPRECEDENCE_ANNOTATION

      public static final UnresolvedType DECLAREPRECEDENCE_ANNOTATION
    • DECLAREPARENTS_ANNOTATION

      public static final UnresolvedType DECLAREPARENTS_ANNOTATION
    • DECLAREMIXIN_ANNOTATION

      public static final UnresolvedType DECLAREMIXIN_ANNOTATION
    • TYPEX_JOINPOINT

      public static final UnresolvedType TYPEX_JOINPOINT
    • TYPEX_PROCEEDINGJOINPOINT

      public static final UnresolvedType TYPEX_PROCEEDINGJOINPOINT
    • TYPEX_STATICJOINPOINT

      public static final UnresolvedType TYPEX_STATICJOINPOINT
    • TYPEX_ENCLOSINGSTATICJOINPOINT

      public static final UnresolvedType TYPEX_ENCLOSINGSTATICJOINPOINT
  • Constructor Details

    • AjcMemberMaker

      public AjcMemberMaker()
  • Method Details

    • ajcPreClinitMethod

      public static ResolvedMember ajcPreClinitMethod​(UnresolvedType declaringType)
    • ajcPostClinitMethod

      public static ResolvedMember ajcPostClinitMethod​(UnresolvedType declaringType)
    • noAspectBoundExceptionInit

      public static Member noAspectBoundExceptionInit()
    • noAspectBoundExceptionInit2

      public static Member noAspectBoundExceptionInit2()
    • noAspectBoundExceptionInitWithCause

      public static Member noAspectBoundExceptionInitWithCause()
    • perCflowPush

      public static ResolvedMember perCflowPush​(UnresolvedType declaringType)
    • perCflowField

      public static ResolvedMember perCflowField​(UnresolvedType declaringType)
    • perSingletonField

      public static ResolvedMember perSingletonField​(UnresolvedType declaringType)
    • initFailureCauseField

      public static ResolvedMember initFailureCauseField​(UnresolvedType declaringType)
    • perObjectField

      public static ResolvedMember perObjectField​(UnresolvedType declaringType, ResolvedType aspectType)
    • perTypeWithinField

      public static ResolvedMember perTypeWithinField​(UnresolvedType declaringType, ResolvedType aspectType)
    • perTypeWithinWithinTypeField

      public static ResolvedMember perTypeWithinWithinTypeField​(UnresolvedType declaringType, ResolvedType aspectType)
    • perObjectBind

      public static ResolvedMember perObjectBind​(UnresolvedType declaringType)
    • perTypeWithinGetInstance

      public static ResolvedMember perTypeWithinGetInstance​(UnresolvedType declaringType)
    • perTypeWithinGetWithinTypeNameMethod

      public static ResolvedMember perTypeWithinGetWithinTypeNameMethod​(UnresolvedType declaringType, boolean inJava5Mode)
    • perTypeWithinCreateAspectInstance

      public static ResolvedMember perTypeWithinCreateAspectInstance​(UnresolvedType declaringType)
    • perObjectInterfaceType

      public static UnresolvedType perObjectInterfaceType​(UnresolvedType aspectType)
    • perObjectInterfaceGet

      public static ResolvedMember perObjectInterfaceGet​(UnresolvedType aspectType)
    • perObjectInterfaceSet

      public static ResolvedMember perObjectInterfaceSet​(UnresolvedType aspectType)
    • perTypeWithinLocalAspectOf

      public static ResolvedMember perTypeWithinLocalAspectOf​(UnresolvedType shadowType, UnresolvedType aspectType)
    • perSingletonAspectOfMethod

      public static ResolvedMember perSingletonAspectOfMethod​(UnresolvedType declaringType)
    • perSingletonHasAspectMethod

      public static ResolvedMember perSingletonHasAspectMethod​(UnresolvedType declaringType)
    • perCflowAspectOfMethod

      public static ResolvedMember perCflowAspectOfMethod​(UnresolvedType declaringType)
    • perCflowHasAspectMethod

      public static ResolvedMember perCflowHasAspectMethod​(UnresolvedType declaringType)
    • perObjectAspectOfMethod

      public static ResolvedMember perObjectAspectOfMethod​(UnresolvedType declaringType)
    • perObjectHasAspectMethod

      public static ResolvedMember perObjectHasAspectMethod​(UnresolvedType declaringType)
    • perTypeWithinAspectOfMethod

      public static ResolvedMember perTypeWithinAspectOfMethod​(UnresolvedType declaringType, boolean inJava5Mode)
    • perTypeWithinHasAspectMethod

      public static ResolvedMember perTypeWithinHasAspectMethod​(UnresolvedType declaringType, boolean inJava5Mode)
    • privilegedAccessMethodForMethod

      public static ResolvedMember privilegedAccessMethodForMethod​(UnresolvedType aspectType, ResolvedMember method)
    • privilegedAccessMethodForFieldGet

      public static ResolvedMember privilegedAccessMethodForFieldGet​(UnresolvedType aspectType, Member field, boolean shortSyntax)
      Return a resolvedmember representing the synthetic getter for the field. The old style (<1.6.9) is a heavyweight static method with a long name. The new style (1.6.9 and later) is short, and reusable across aspects.
      Parameters:
      aspectType - the aspect attempting the access
      field - the field to be accessed
      shortSyntax - is the old (long) or new (short) style format being used
      Returns:
      a resolvedmember representing the synthetic getter
    • privilegedAccessMethodForFieldSet

      public static ResolvedMember privilegedAccessMethodForFieldSet​(UnresolvedType aspectType, Member field, boolean shortSyntax)
      Return a resolvedmember representing the synthetic setter for the field. The old style (<1.6.9) is a heavyweight static method with a long name. The new style (1.6.9 and later) is short, not always static, and reusable across aspects.
      Parameters:
      aspectType - the aspect attempting the access
      field - the field to be accessed
      shortSyntax - is the old or new style format being used
      Returns:
      a resolvedmember representing the synthetic setter
    • superAccessMethod

      public static ResolvedMember superAccessMethod​(UnresolvedType baseType, ResolvedMember method)
    • inlineAccessMethodForMethod

      public static ResolvedMember inlineAccessMethodForMethod​(UnresolvedType aspectType, ResolvedMember method)
    • inlineAccessMethodForFieldGet

      public static ResolvedMember inlineAccessMethodForFieldGet​(UnresolvedType aspectType, Member field)
    • inlineAccessMethodForFieldSet

      public static ResolvedMember inlineAccessMethodForFieldSet​(UnresolvedType aspectType, Member field)
    • cflowStackPeekInstance

      public static Member cflowStackPeekInstance()
    • cflowStackPushInstance

      public static Member cflowStackPushInstance()
    • cflowStackIsValid

      public static Member cflowStackIsValid()
    • cflowStackInit

      public static Member cflowStackInit()
    • aroundClosurePreInitializationField

      public static Member aroundClosurePreInitializationField()
    • aroundClosurePreInitializationGetter

      public static Member aroundClosurePreInitializationGetter()
    • preIntroducedConstructor

      public static ResolvedMember preIntroducedConstructor​(UnresolvedType aspectType, UnresolvedType targetType, UnresolvedType[] paramTypes)
    • postIntroducedConstructor

      public static ResolvedMember postIntroducedConstructor​(UnresolvedType aspectType, UnresolvedType targetType, UnresolvedType[] paramTypes)
    • itdAtDeclareParentsField

      public static ResolvedMember itdAtDeclareParentsField​(ResolvedType targetType, UnresolvedType itdType, UnresolvedType aspectType)
    • interConstructor

      public static ResolvedMember interConstructor​(ResolvedType targetType, ResolvedMember constructor, UnresolvedType aspectType)
    • interFieldInitializer

      public static ResolvedMember interFieldInitializer​(ResolvedMember field, UnresolvedType aspectType)
    • interFieldSetDispatcher

      public static ResolvedMember interFieldSetDispatcher​(ResolvedMember field, UnresolvedType aspectType)
      This static method goes on the aspect that declares the inter-type field
    • interFieldGetDispatcher

      public static ResolvedMember interFieldGetDispatcher​(ResolvedMember field, UnresolvedType aspectType)
      This static method goes on the aspect that declares the inter-type field
    • interFieldClassField

      public static ResolvedMember interFieldClassField​(ResolvedMember field, UnresolvedType aspectType, boolean newStyle)
      This field goes on the class the field is declared onto. Field names for ITDs onto interfaces are handled below.
    • interFieldInterfaceField

      public static ResolvedMember interFieldInterfaceField​(ResolvedMember field, UnresolvedType onClass, UnresolvedType aspectType, boolean newStyle)
      This field goes on top-most implementers of the interface the field is declared onto
    • interFieldInterfaceSetter

      public static ResolvedMember interFieldInterfaceSetter​(ResolvedMember field, ResolvedType onType, UnresolvedType aspectType)
      This instance method goes on the interface the field is declared onto as well as its top-most implementors
    • interFieldInterfaceGetter

      public static ResolvedMember interFieldInterfaceGetter​(ResolvedMember field, ResolvedType onType, UnresolvedType aspectType)
      This instance method goes on the interface the field is declared onto as well as its top-most implementors
    • interMethod

      public static ResolvedMember interMethod​(ResolvedMember meth, UnresolvedType aspectType, boolean onInterface)
      This method goes on the target type of the inter-type method. (and possibly the topmost-implementors, if the target type is an interface). The implementation will call the interMethodDispatch method on the aspect.
    • interMethodBridger

      public static ResolvedMember interMethodBridger​(ResolvedMember meth, UnresolvedType aspectType, boolean onInterface)
      This method goes on the target type of the inter-type method. (and possibly the topmost-implementors, if the target type is an interface). The implementation will call the interMethodDispatch method on the aspect.
    • bridgerToInterMethod

      public static ResolvedMember bridgerToInterMethod​(ResolvedMember meth, UnresolvedType aspectType)
      Sometimes the intertyped method requires a bridge method alongside it. For example if the method 'N SomeI<N>.m()' is put onto an interface 'interface I<N extends Number>' and then a concrete implementation is 'class C implements I<Float>' then the ITD on the interface will be 'Number m()', whereas the ITD on the 'topmostimplementor' will be 'Float m()'. A bridge method needs to be created in the topmostimplementor 'Number m()' that delegates to 'Float m()'
    • interMethodDispatcher

      public static ResolvedMember interMethodDispatcher​(ResolvedMember meth, UnresolvedType aspectType)
      This static method goes on the declaring aspect of the inter-type method. The implementation calls the interMethodBody() method on the aspect.
    • interMethodBody

      public static ResolvedMember interMethodBody​(ResolvedMember meth, UnresolvedType aspectType)
      This method goes on the declaring aspect of the inter-type method. It contains the real body of the ITD method.
    • toObjectConversionMethod

      public static ResolvedMember toObjectConversionMethod​(UnresolvedType fromType)
    • interfaceConstructor

      public static Member interfaceConstructor​(ResolvedType resolvedTypeX)