Top Description Fields Constructors Methods
org.aspectj.weaver

public Class AjcMemberMaker

extends Object
Class Inheritance
Imports
java.lang.reflect.Modifier

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 Summary

Modifier and TypeField and Description
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
private static final int
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
private static final int
private static final int
private static final int
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
public static final UnresolvedType
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static Member
public static Member
public static ResolvedMember
bridgerToInterMethod(ResolvedMember meth, UnresolvedType aspectType)

Sometimes the intertyped method requires a bridge method alongside it.

public static Member
public static Member
public static Member
public static Member
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
interConstructor(ResolvedType targetType, ResolvedMember constructor, UnresolvedType aspectType)

public static Member
public static ResolvedMember
interFieldClassField(ResolvedMember field, UnresolvedType aspectType, boolean newStyle)

This field goes on the class the field is declared onto.

public static ResolvedMember
interFieldGetDispatcher(ResolvedMember field, UnresolvedType aspectType)

This static method goes on the aspect that declares the inter-type field

public static ResolvedMember
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

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

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

public static ResolvedMember
interFieldSetDispatcher(ResolvedMember field, UnresolvedType aspectType)

This static method goes on the aspect that declares the inter-type field

public static ResolvedMember
interMethod(ResolvedMember meth, UnresolvedType aspectType, boolean onInterface)

This method goes on the target type of the inter-type method.

public static ResolvedMember
interMethodBody(ResolvedMember meth, UnresolvedType aspectType)

This method goes on the declaring aspect of the inter-type method.

public static ResolvedMember
interMethodBridger(ResolvedMember meth, UnresolvedType aspectType, boolean onInterface)

This method goes on the target type of the inter-type method.

public static ResolvedMember
interMethodDispatcher(ResolvedMember meth, UnresolvedType aspectType)

This static method goes on the declaring aspect of the inter-type method.

private static boolean
public static ResolvedMember
private static int
makeNonFinal(int modifiers)

private static int
makePublicNonFinal(int modifiers)

public static Member
public static Member
public static Member
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
perObjectField(UnresolvedType declaringType, ResolvedType aspectType)

public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static UnresolvedType
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
perTypeWithinAspectOfMethod(UnresolvedType declaringType, boolean inJava5Mode)

public static ResolvedMember
public static ResolvedMember
perTypeWithinField(UnresolvedType declaringType, ResolvedType aspectType)

public static ResolvedMember
public static ResolvedMember
perTypeWithinGetWithinTypeNameMethod(UnresolvedType declaringType, boolean inJava5Mode)

public static ResolvedMember
perTypeWithinHasAspectMethod(UnresolvedType declaringType, boolean inJava5Mode)

public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
public static ResolvedMember

Returns:

a resolvedmember representing the synthetic getter
privilegedAccessMethodForFieldGet
(UnresolvedType
the aspect attempting the access
aspectType
,
Member
the field to be accessed
field
,
boolean
is the old (long) or new (short) style format being used
shortSyntax
)

Return a resolvedmember representing the synthetic getter for the field.

public static ResolvedMember

Returns:

a resolvedmember representing the synthetic setter
privilegedAccessMethodForFieldSet
(UnresolvedType
the aspect attempting the access
aspectType
,
Member
the field to be accessed
field
,
boolean
is the old or new style format being used
shortSyntax
)

Return a resolvedmember representing the synthetic setter for the field.

public static ResolvedMember
public static ResolvedMember
public static ResolvedMember
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AFTER_ANNOTATIONback to summary
public static final UnresolvedType AFTER_ANNOTATION
AFTERRETURNING_ANNOTATIONback to summary
public static final UnresolvedType AFTERRETURNING_ANNOTATION
AFTERTHROWING_ANNOTATIONback to summary
public static final UnresolvedType AFTERTHROWING_ANNOTATION
AROUND_ANNOTATIONback to summary
public static final UnresolvedType AROUND_ANNOTATION
AROUND_CLOSURE_TYPEback to summary
public static final UnresolvedType AROUND_CLOSURE_TYPE
ASPECT_ANNOTATIONback to summary
public static final UnresolvedType ASPECT_ANNOTATION
BEFORE_ANNOTATIONback to summary
public static final UnresolvedType BEFORE_ANNOTATION
BRIDGEback to summary
private static final int BRIDGE
CFLOW_STACK_TYPEback to summary
public static final UnresolvedType CFLOW_STACK_TYPE
CONVERSIONS_TYPEback to summary
public static final UnresolvedType CONVERSIONS_TYPE
DECLAREERROR_ANNOTATIONback to summary
public static final UnresolvedType DECLAREERROR_ANNOTATION
DECLAREMIXIN_ANNOTATIONback to summary
public static final UnresolvedType DECLAREMIXIN_ANNOTATION
DECLAREPARENTS_ANNOTATIONback to summary
public static final UnresolvedType DECLAREPARENTS_ANNOTATION
DECLAREPRECEDENCE_ANNOTATIONback to summary
public static final UnresolvedType DECLAREPRECEDENCE_ANNOTATION
DECLAREWARNING_ANNOTATIONback to summary
public static final UnresolvedType DECLAREWARNING_ANNOTATION
NO_ASPECT_BOUND_EXCEPTIONback to summary
public static final UnresolvedType NO_ASPECT_BOUND_EXCEPTION
POINTCUT_ANNOTATIONback to summary
public static final UnresolvedType POINTCUT_ANNOTATION
PRIVATE_STATICback to summary
private static final int PRIVATE_STATIC
PUBLIC_STATICback to summary
private static final int PUBLIC_STATIC
PUBLIC_STATIC_FINALback to summary
private static final int PUBLIC_STATIC_FINAL
TYPEX_ENCLOSINGSTATICJOINPOINTback to summary
public static final UnresolvedType TYPEX_ENCLOSINGSTATICJOINPOINT
TYPEX_JOINPOINTback to summary
public static final UnresolvedType TYPEX_JOINPOINT
TYPEX_PROCEEDINGJOINPOINTback to summary
public static final UnresolvedType TYPEX_PROCEEDINGJOINPOINT
TYPEX_STATICJOINPOINTback to summary
public static final UnresolvedType TYPEX_STATICJOINPOINT
VISIBILITYback to summary
private static final int VISIBILITY

Constructor Detail

AjcMemberMakerback to summary
public AjcMemberMaker()

Method Detail

addCookieToback to summary
private static ResolvedMember addCookieTo(ResolvedMember ret, UnresolvedType aspectType)
ajcPostClinitMethodback to summary
public static ResolvedMember ajcPostClinitMethod(UnresolvedType declaringType)
ajcPreClinitMethodback to summary
public static ResolvedMember ajcPreClinitMethod(UnresolvedType declaringType)
aroundClosurePreInitializationFieldback to summary
public static Member aroundClosurePreInitializationField()
aroundClosurePreInitializationGetterback to summary
public static Member aroundClosurePreInitializationGetter()
bridgerToInterMethodback to summary
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()'

cflowStackInitback to summary
public static Member cflowStackInit()
cflowStackIsValidback to summary
public static Member cflowStackIsValid()
cflowStackPeekInstanceback to summary
public static Member cflowStackPeekInstance()
cflowStackPushInstanceback to summary
public static Member cflowStackPushInstance()
initFailureCauseFieldback to summary
public static ResolvedMember initFailureCauseField(UnresolvedType declaringType)
inlineAccessMethodForFieldGetback to summary
public static ResolvedMember inlineAccessMethodForFieldGet(UnresolvedType aspectType, Member field)
inlineAccessMethodForFieldSetback to summary
public static ResolvedMember inlineAccessMethodForFieldSet(UnresolvedType aspectType, Member field)
inlineAccessMethodForMethodback to summary
public static ResolvedMember inlineAccessMethodForMethod(UnresolvedType aspectType, ResolvedMember method)
interConstructorback to summary
public static ResolvedMember interConstructor(ResolvedType targetType, ResolvedMember constructor, UnresolvedType aspectType)
interfaceConstructorback to summary
public static Member interfaceConstructor(ResolvedType resolvedTypeX)
interFieldClassFieldback to summary
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.

interFieldGetDispatcherback to summary
public static ResolvedMember interFieldGetDispatcher(ResolvedMember field, UnresolvedType aspectType)

This static method goes on the aspect that declares the inter-type field

interFieldInitializerback to summary
public static ResolvedMember interFieldInitializer(ResolvedMember field, UnresolvedType aspectType)
interFieldInterfaceFieldback to summary
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

interFieldInterfaceGetterback to summary
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

interFieldInterfaceSetterback to summary
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

interFieldSetDispatcherback to summary
public static ResolvedMember interFieldSetDispatcher(ResolvedMember field, UnresolvedType aspectType)

This static method goes on the aspect that declares the inter-type field

interMethodback to summary
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.

interMethodBodyback to summary
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.

interMethodBridgerback to summary
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.

interMethodDispatcherback to summary
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.

isSerializableAspectback to summary
private static boolean isSerializableAspect(ResolvedType aspectType)
itdAtDeclareParentsFieldback to summary
public static ResolvedMember itdAtDeclareParentsField(ResolvedType targetType, UnresolvedType itdType, UnresolvedType aspectType)
makeNonFinalback to summary
private static int makeNonFinal(int modifiers)
makePublicNonFinalback to summary
private static int makePublicNonFinal(int modifiers)
noAspectBoundExceptionInitback to summary
public static Member noAspectBoundExceptionInit()
noAspectBoundExceptionInit2back to summary
public static Member noAspectBoundExceptionInit2()
noAspectBoundExceptionInitWithCauseback to summary
public static Member noAspectBoundExceptionInitWithCause()
perCflowAspectOfMethodback to summary
public static ResolvedMember perCflowAspectOfMethod(UnresolvedType declaringType)
perCflowFieldback to summary
public static ResolvedMember perCflowField(UnresolvedType declaringType)
perCflowHasAspectMethodback to summary
public static ResolvedMember perCflowHasAspectMethod(UnresolvedType declaringType)
perCflowPushback to summary
public static ResolvedMember perCflowPush(UnresolvedType declaringType)
perObjectAspectOfMethodback to summary
public static ResolvedMember perObjectAspectOfMethod(UnresolvedType declaringType)
perObjectBindback to summary
public static ResolvedMember perObjectBind(UnresolvedType declaringType)
perObjectFieldback to summary
public static ResolvedMember perObjectField(UnresolvedType declaringType, ResolvedType aspectType)
perObjectHasAspectMethodback to summary
public static ResolvedMember perObjectHasAspectMethod(UnresolvedType declaringType)
perObjectInterfaceGetback to summary
public static ResolvedMember perObjectInterfaceGet(UnresolvedType aspectType)
perObjectInterfaceSetback to summary
public static ResolvedMember perObjectInterfaceSet(UnresolvedType aspectType)
perObjectInterfaceTypeback to summary
public static UnresolvedType perObjectInterfaceType(UnresolvedType aspectType)
perSingletonAspectOfMethodback to summary
public static ResolvedMember perSingletonAspectOfMethod(UnresolvedType declaringType)
perSingletonFieldback to summary
public static ResolvedMember perSingletonField(UnresolvedType declaringType)
perSingletonHasAspectMethodback to summary
public static ResolvedMember perSingletonHasAspectMethod(UnresolvedType declaringType)
perTypeWithinAspectOfMethodback to summary
public static ResolvedMember perTypeWithinAspectOfMethod(UnresolvedType declaringType, boolean inJava5Mode)
perTypeWithinCreateAspectInstanceback to summary
public static ResolvedMember perTypeWithinCreateAspectInstance(UnresolvedType declaringType)
perTypeWithinFieldback to summary
public static ResolvedMember perTypeWithinField(UnresolvedType declaringType, ResolvedType aspectType)
perTypeWithinGetInstanceback to summary
public static ResolvedMember perTypeWithinGetInstance(UnresolvedType declaringType)
perTypeWithinGetWithinTypeNameMethodback to summary
public static ResolvedMember perTypeWithinGetWithinTypeNameMethod(UnresolvedType declaringType, boolean inJava5Mode)
perTypeWithinHasAspectMethodback to summary
public static ResolvedMember perTypeWithinHasAspectMethod(UnresolvedType declaringType, boolean inJava5Mode)
perTypeWithinLocalAspectOfback to summary
public static ResolvedMember perTypeWithinLocalAspectOf(UnresolvedType shadowType, UnresolvedType aspectType)
perTypeWithinWithinTypeFieldback to summary
public static ResolvedMember perTypeWithinWithinTypeField(UnresolvedType declaringType, ResolvedType aspectType)
postIntroducedConstructorback to summary
public static ResolvedMember postIntroducedConstructor(UnresolvedType aspectType, UnresolvedType targetType, UnresolvedType[] paramTypes)
preIntroducedConstructorback to summary
public static ResolvedMember preIntroducedConstructor(UnresolvedType aspectType, UnresolvedType targetType, UnresolvedType[] paramTypes)
privilegedAccessMethodForFieldGetback to summary
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:UnresolvedType

the aspect attempting the access

field:Member

the field to be accessed

shortSyntax:boolean

is the old (long) or new (short) style format being used

Returns:ResolvedMember

a resolvedmember representing the synthetic getter

privilegedAccessMethodForFieldSetback to summary
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:UnresolvedType

the aspect attempting the access

field:Member

the field to be accessed

shortSyntax:boolean

is the old or new style format being used

Returns:ResolvedMember

a resolvedmember representing the synthetic setter

privilegedAccessMethodForMethodback to summary
public static ResolvedMember privilegedAccessMethodForMethod(UnresolvedType aspectType, ResolvedMember method)
superAccessMethodback to summary
public static ResolvedMember superAccessMethod(UnresolvedType baseType, ResolvedMember method)
toObjectConversionMethodback to summary
public static ResolvedMember toObjectConversionMethod(UnresolvedType fromType)