org.aspectj.weaver
Class NameMangler

java.lang.Object
  extended by org.aspectj.weaver.NameMangler

public class NameMangler
extends java.lang.Object


Field Summary
static java.lang.String AJC_POST_CLINIT_NAME
           
static java.lang.String AJC_PRE_CLINIT_NAME
           
static java.lang.String ANNOTATION_CACHE_FIELD_NAME
           
static java.lang.String CFLOW_COUNTER_TYPE
           
static UnresolvedType CFLOW_COUNTER_UNRESOLVEDTYPE
           
static java.lang.String CFLOW_STACK_TYPE
           
static UnresolvedType CFLOW_STACK_UNRESOLVEDTYPE
           
static java.lang.String INITFAILURECAUSE_FIELD_NAME
           
static java.lang.String ITD_PREFIX
           
static java.lang.String PERCFLOW_FIELD_NAME
           
static java.lang.String PERCFLOW_PUSH_METHOD
           
static java.lang.String PEROBJECT_BIND_METHOD
           
static java.lang.String PERSINGLETON_FIELD_NAME
           
static java.lang.String PERTYPEWITHIN_CREATEASPECTINSTANCE_METHOD
           
static java.lang.String PERTYPEWITHIN_GETINSTANCE_METHOD
           
static java.lang.String PERTYPEWITHIN_GETWITHINTYPENAME_METHOD
           
static java.lang.String PERTYPEWITHIN_WITHINTYPEFIELD
           
static java.lang.String PREFIX
           
static char[] PREFIX_CHARS
           
static java.lang.String SOFT_EXCEPTION_TYPE
           
 
Constructor Summary
NameMangler()
           
 
Method Summary
static java.lang.String adviceName(java.lang.String nameAsIdentifier, AdviceKind kind, int adviceSeqNumber, int pcdHash)
          The name of methods corresponding to advice declarations Of the form: "ajc$[AdviceKind]$[AspectName]$[NumberOfAdviceInAspect]$[PointcutHash]"
static java.lang.String aroundAdviceMethodName(Member shadowSig, java.lang.String suffixTag)
           
static java.lang.String aroundShadowMethodName(Member shadowSig, java.lang.String suffixTag)
           
static java.lang.String cflowCounter(CrosscuttingMembers xcut)
           
static java.lang.String cflowStack(CrosscuttingMembers xcut)
           
static java.lang.String getExtractableName(Member shadowSignature)
           
static java.lang.String inlineAccessMethodForFieldGet(java.lang.String name, UnresolvedType objectType, UnresolvedType aspectType)
           
static java.lang.String inlineAccessMethodForFieldSet(java.lang.String name, UnresolvedType objectType, UnresolvedType aspectType)
           
static java.lang.String inlineAccessMethodForMethod(java.lang.String name, UnresolvedType objectType, UnresolvedType aspectType)
           
static java.lang.String interFieldClassField(int modifiers, UnresolvedType aspectType, UnresolvedType classType, java.lang.String name)
          This field goes on the class the field is declared onto
static java.lang.String interFieldGetDispatcher(UnresolvedType aspectType, UnresolvedType onType, java.lang.String name)
          This static method goes on the aspect that declares the inter-type field
static java.lang.String interFieldInitializer(UnresolvedType aspectType, UnresolvedType classType, java.lang.String name)
          This static void method goes on the aspect that declares the inter-type field and is called from the appropriate place (target's initializer, or clinit, or topmost implementer's inits), to initialize the field;
static java.lang.String interFieldInterfaceField(UnresolvedType aspectType, UnresolvedType interfaceType, java.lang.String name)
          This field goes on top-most implementers of the interface the field is declared onto
static java.lang.String interFieldInterfaceGetter(UnresolvedType aspectType, UnresolvedType interfaceType, java.lang.String name)
          This instance method goes on the interface the field is declared onto as well as its top-most implementors
static java.lang.String interFieldInterfaceSetter(UnresolvedType aspectType, UnresolvedType interfaceType, java.lang.String name)
          This instance method goes on the interface the field is declared onto as well as its top-most implementors
static java.lang.String interFieldSetDispatcher(UnresolvedType aspectType, UnresolvedType onType, java.lang.String name)
          This static method goes on the aspect that declares the inter-type field
static java.lang.String interMethod(int modifiers, UnresolvedType aspectType, UnresolvedType classType, java.lang.String name)
          This method goes on the target type of the inter-type method.
static java.lang.String interMethodBody(UnresolvedType aspectType, UnresolvedType classType, java.lang.String name)
          This static method goes on the declaring aspect of the inter-type method.
static java.lang.String interMethodDispatcher(UnresolvedType aspectType, UnresolvedType classType, java.lang.String name)
          This static method goes on the declaring aspect of the inter-type method.
static boolean isSyntheticMethod(java.lang.String methodName, boolean declaredInAspect)
           
static java.lang.String itdAtDeclareParentsField(UnresolvedType aspectType, UnresolvedType itdType)
           
static java.lang.String makeClosureClassName(UnresolvedType enclosingType, java.lang.String suffix)
           
static java.lang.String makeName(java.lang.String s1, java.lang.String s2, java.lang.String s3)
           
static java.lang.String makeName(java.lang.String s1, java.lang.String s2, java.lang.String s3, java.lang.String s4)
           
static java.lang.String perObjectInterfaceField(UnresolvedType aspectType)
           
static java.lang.String perObjectInterfaceGet(UnresolvedType aspectType)
           
static java.lang.String perObjectInterfaceSet(UnresolvedType aspectType)
           
static java.lang.String perTypeWithinFieldForTarget(UnresolvedType aspectType)
           
static java.lang.String perTypeWithinLocalAspectOf(UnresolvedType aspectType)
           
static java.lang.String postIntroducedConstructor(UnresolvedType aspectType, UnresolvedType targetType)
          This static method goes on the declaring aspect of the inter-type constructor.
static java.lang.String preIntroducedConstructor(UnresolvedType aspectType, UnresolvedType targetType)
          This static method goes on the declaring aspect of the inter-type constructor.
static java.lang.String privilegedAccessMethodForFieldGet(java.lang.String name, UnresolvedType objectType, UnresolvedType aspectType)
          Create the old style (<1.6.9) format getter name which includes the aspect requesting access and the type containing the field in the name of the type.
static java.lang.String privilegedAccessMethodForFieldSet(java.lang.String name, UnresolvedType objectType, UnresolvedType aspectType)
          Create the old style (<1.6.9) format setter name which includes the aspect requesting access and the type containing the field in the name of the type.
static java.lang.String privilegedAccessMethodForMethod(java.lang.String name, UnresolvedType objectType, UnresolvedType aspectType)
           
static java.lang.String proceedMethodName(java.lang.String adviceMethodName)
           
static java.lang.String protectedDispatchMethod(UnresolvedType classType, java.lang.String name)
          This static method goes on the target class of the inter-type method.
static java.lang.String superDispatchMethod(UnresolvedType classType, java.lang.String name)
          This static method goes on the target class of the inter-type method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values

PREFIX_CHARS

public static final char[] PREFIX_CHARS

ITD_PREFIX

public static final java.lang.String ITD_PREFIX
See Also:
Constant Field Values

CFLOW_STACK_TYPE

public static final java.lang.String CFLOW_STACK_TYPE
See Also:
Constant Field Values

CFLOW_COUNTER_TYPE

public static final java.lang.String CFLOW_COUNTER_TYPE
See Also:
Constant Field Values

CFLOW_STACK_UNRESOLVEDTYPE

public static final UnresolvedType CFLOW_STACK_UNRESOLVEDTYPE

CFLOW_COUNTER_UNRESOLVEDTYPE

public static final UnresolvedType CFLOW_COUNTER_UNRESOLVEDTYPE

SOFT_EXCEPTION_TYPE

public static final java.lang.String SOFT_EXCEPTION_TYPE
See Also:
Constant Field Values

PERSINGLETON_FIELD_NAME

public static final java.lang.String PERSINGLETON_FIELD_NAME
See Also:
Constant Field Values

PERCFLOW_FIELD_NAME

public static final java.lang.String PERCFLOW_FIELD_NAME
See Also:
Constant Field Values

PERCFLOW_PUSH_METHOD

public static final java.lang.String PERCFLOW_PUSH_METHOD
See Also:
Constant Field Values

PEROBJECT_BIND_METHOD

public static final java.lang.String PEROBJECT_BIND_METHOD
See Also:
Constant Field Values

PERTYPEWITHIN_GETINSTANCE_METHOD

public static final java.lang.String PERTYPEWITHIN_GETINSTANCE_METHOD
See Also:
Constant Field Values

PERTYPEWITHIN_CREATEASPECTINSTANCE_METHOD

public static final java.lang.String PERTYPEWITHIN_CREATEASPECTINSTANCE_METHOD
See Also:
Constant Field Values

PERTYPEWITHIN_WITHINTYPEFIELD

public static final java.lang.String PERTYPEWITHIN_WITHINTYPEFIELD
See Also:
Constant Field Values

PERTYPEWITHIN_GETWITHINTYPENAME_METHOD

public static final java.lang.String PERTYPEWITHIN_GETWITHINTYPENAME_METHOD
See Also:
Constant Field Values

AJC_PRE_CLINIT_NAME

public static final java.lang.String AJC_PRE_CLINIT_NAME
See Also:
Constant Field Values

AJC_POST_CLINIT_NAME

public static final java.lang.String AJC_POST_CLINIT_NAME
See Also:
Constant Field Values

INITFAILURECAUSE_FIELD_NAME

public static final java.lang.String INITFAILURECAUSE_FIELD_NAME
See Also:
Constant Field Values

ANNOTATION_CACHE_FIELD_NAME

public static final java.lang.String ANNOTATION_CACHE_FIELD_NAME
See Also:
Constant Field Values
Constructor Detail

NameMangler

public NameMangler()
Method Detail

isSyntheticMethod

public static boolean isSyntheticMethod(java.lang.String methodName,
                                        boolean declaredInAspect)

perObjectInterfaceGet

public static java.lang.String perObjectInterfaceGet(UnresolvedType aspectType)

perObjectInterfaceSet

public static java.lang.String perObjectInterfaceSet(UnresolvedType aspectType)

perObjectInterfaceField

public static java.lang.String perObjectInterfaceField(UnresolvedType aspectType)

perTypeWithinFieldForTarget

public static java.lang.String perTypeWithinFieldForTarget(UnresolvedType aspectType)

perTypeWithinLocalAspectOf

public static java.lang.String perTypeWithinLocalAspectOf(UnresolvedType aspectType)

itdAtDeclareParentsField

public static java.lang.String itdAtDeclareParentsField(UnresolvedType aspectType,
                                                        UnresolvedType itdType)

privilegedAccessMethodForMethod

public static java.lang.String privilegedAccessMethodForMethod(java.lang.String name,
                                                               UnresolvedType objectType,
                                                               UnresolvedType aspectType)

privilegedAccessMethodForFieldGet

public static java.lang.String privilegedAccessMethodForFieldGet(java.lang.String name,
                                                                 UnresolvedType objectType,
                                                                 UnresolvedType aspectType)
Create the old style (<1.6.9) format getter name which includes the aspect requesting access and the type containing the field in the name of the type. At 1.6.9 and above the name is simply ajc$get$


privilegedAccessMethodForFieldSet

public static java.lang.String privilegedAccessMethodForFieldSet(java.lang.String name,
                                                                 UnresolvedType objectType,
                                                                 UnresolvedType aspectType)
Create the old style (<1.6.9) format setter name which includes the aspect requesting access and the type containing the field in the name of the type. At 1.6.9 and above the name is simply ajc$set$


inlineAccessMethodForMethod

public static java.lang.String inlineAccessMethodForMethod(java.lang.String name,
                                                           UnresolvedType objectType,
                                                           UnresolvedType aspectType)

inlineAccessMethodForFieldGet

public static java.lang.String inlineAccessMethodForFieldGet(java.lang.String name,
                                                             UnresolvedType objectType,
                                                             UnresolvedType aspectType)

inlineAccessMethodForFieldSet

public static java.lang.String inlineAccessMethodForFieldSet(java.lang.String name,
                                                             UnresolvedType objectType,
                                                             UnresolvedType aspectType)

adviceName

public static java.lang.String adviceName(java.lang.String nameAsIdentifier,
                                          AdviceKind kind,
                                          int adviceSeqNumber,
                                          int pcdHash)
The name of methods corresponding to advice declarations Of the form: "ajc$[AdviceKind]$[AspectName]$[NumberOfAdviceInAspect]$[PointcutHash]"


interFieldInterfaceField

public static java.lang.String interFieldInterfaceField(UnresolvedType aspectType,
                                                        UnresolvedType interfaceType,
                                                        java.lang.String name)
This field goes on top-most implementers of the interface the field is declared onto


interFieldInterfaceSetter

public static java.lang.String interFieldInterfaceSetter(UnresolvedType aspectType,
                                                         UnresolvedType interfaceType,
                                                         java.lang.String name)
This instance method goes on the interface the field is declared onto as well as its top-most implementors


interFieldInterfaceGetter

public static java.lang.String interFieldInterfaceGetter(UnresolvedType aspectType,
                                                         UnresolvedType interfaceType,
                                                         java.lang.String name)
This instance method goes on the interface the field is declared onto as well as its top-most implementors


interFieldSetDispatcher

public static java.lang.String interFieldSetDispatcher(UnresolvedType aspectType,
                                                       UnresolvedType onType,
                                                       java.lang.String name)
This static method goes on the aspect that declares the inter-type field


interFieldGetDispatcher

public static java.lang.String interFieldGetDispatcher(UnresolvedType aspectType,
                                                       UnresolvedType onType,
                                                       java.lang.String name)
This static method goes on the aspect that declares the inter-type field


interFieldClassField

public static java.lang.String interFieldClassField(int modifiers,
                                                    UnresolvedType aspectType,
                                                    UnresolvedType classType,
                                                    java.lang.String name)
This field goes on the class the field is declared onto


interFieldInitializer

public static java.lang.String interFieldInitializer(UnresolvedType aspectType,
                                                     UnresolvedType classType,
                                                     java.lang.String name)
This static void method goes on the aspect that declares the inter-type field and is called from the appropriate place (target's initializer, or clinit, or topmost implementer's inits), to initialize the field;


interMethod

public static java.lang.String interMethod(int modifiers,
                                           UnresolvedType aspectType,
                                           UnresolvedType classType,
                                           java.lang.String name)
This method goes on the target type of the inter-type method. (and possibly the topmost-implemeters, if the target type is an interface)


interMethodDispatcher

public static java.lang.String interMethodDispatcher(UnresolvedType aspectType,
                                                     UnresolvedType classType,
                                                     java.lang.String name)
This static method goes on the declaring aspect of the inter-type method.


interMethodBody

public static java.lang.String interMethodBody(UnresolvedType aspectType,
                                               UnresolvedType classType,
                                               java.lang.String name)
This static method goes on the declaring aspect of the inter-type method.


preIntroducedConstructor

public static java.lang.String preIntroducedConstructor(UnresolvedType aspectType,
                                                        UnresolvedType targetType)
This static method goes on the declaring aspect of the inter-type constructor.


postIntroducedConstructor

public static java.lang.String postIntroducedConstructor(UnresolvedType aspectType,
                                                         UnresolvedType targetType)
This static method goes on the declaring aspect of the inter-type constructor.


superDispatchMethod

public static java.lang.String superDispatchMethod(UnresolvedType classType,
                                                   java.lang.String name)
This static method goes on the target class of the inter-type method.


protectedDispatchMethod

public static java.lang.String protectedDispatchMethod(UnresolvedType classType,
                                                       java.lang.String name)
This static method goes on the target class of the inter-type method.


makeName

public static java.lang.String makeName(java.lang.String s1,
                                        java.lang.String s2,
                                        java.lang.String s3)

makeName

public static java.lang.String makeName(java.lang.String s1,
                                        java.lang.String s2,
                                        java.lang.String s3,
                                        java.lang.String s4)

cflowStack

public static java.lang.String cflowStack(CrosscuttingMembers xcut)

cflowCounter

public static java.lang.String cflowCounter(CrosscuttingMembers xcut)

makeClosureClassName

public static java.lang.String makeClosureClassName(UnresolvedType enclosingType,
                                                    java.lang.String suffix)

aroundShadowMethodName

public static java.lang.String aroundShadowMethodName(Member shadowSig,
                                                      java.lang.String suffixTag)

aroundAdviceMethodName

public static java.lang.String aroundAdviceMethodName(Member shadowSig,
                                                      java.lang.String suffixTag)

getExtractableName

public static java.lang.String getExtractableName(Member shadowSignature)

proceedMethodName

public static java.lang.String proceedMethodName(java.lang.String adviceMethodName)