Package org.aspectj.weaver
Class Shadow
java.lang.Object
org.aspectj.weaver.Shadow
- Direct Known Subclasses:
BcelShadow,ReflectionShadow,StandardShadow
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA type-safe enum representing the kind of shadows -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Shadow.Kindstatic intstatic intstatic Stringstatic Stringstatic Shadow.Kindstatic intstatic Shadow.Kindstatic intprotected Shadowstatic Stringstatic Shadow.Kindstatic intstatic Stringstatic Stringstatic Shadow.Kindstatic intstatic Shadow.Kindstatic intstatic Shadow.Kindstatic Stringstatic intstatic intstatic Stringstatic Stringstatic Shadow.KindThese names are the ones that will be returned by thisJoinPoint.getKind() Those need to be documented somewherestatic intstatic Shadow.Kindstatic intprotected List<ShadowMunger>protected booleanstatic intstatic Shadow.Kindstatic Stringstatic intstatic Shadow.Kind[]intstatic Shadow.Kindstatic Stringstatic intstatic Stringstatic Stringstatic Shadow.Kindstatic intstatic Shadow.Kindstatic int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedShadow(Shadow.Kind kind, Member signature, Shadow enclosingShadow) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMunger(ShadowMunger munger)protected booleancheckCanThrow(ShadowMunger munger, ResolvedType resolvedTypeX)protected booleancheckMunger(ShadowMunger munger)Only does the check if the munger requires it (@AJ aspects don't)abstract VargetArgAnnotationVar(int i, UnresolvedType forAnnotationType)intgetArgType(int arg)abstract VargetArgVar(int i)abstract Memberabstract UnresolvedTypeabstract WorldgetKind()returns the kind of shadow this is, representing what happens under this shadowabstract VargetKindedAnnotationVar(UnresolvedType forAnnotationType)returns the signature of the thing under this shadow, with any synthetic arguments removedreturns the resolved signature of the thing under this shadowreturns the signature of the thing under this shadowabstract ISourceLocationabstract VargetTargetAnnotationVar(UnresolvedType forAnnotationType)the type of the target object hereabstract Vara var referencing the targetabstract VargetThisAnnotationVar(UnresolvedType forAnnotationType)abstract VargetThisAspectInstanceVar(ResolvedType aspectType)abstract Varabstract Varabstract Varthe type of the this object hereabstract Vara var referencing thisabstract VargetWithinAnnotationVar(UnresolvedType forAnnotationType)abstract VargetWithinCodeAnnotationVar(UnresolvedType forAnnotationType)booleancould target(*) pcd ever matchbooleanhasThis()could this(*) pcd ever matchstatic inthowMany(int i)Return count of how many bits set in the supplied parameter.voidbooleanbooleanprotected voidPrepare the shadow for implementation.voidsetMatchingSignature(Member member)toResolvedString(World world)static Set<Shadow.Kind>toSet(int i)Convert a bit array for the shadow kinds into a set of them...toString()
-
Field Details
-
enclosingShadow
-
mungers
-
needAroundClosureStacking
protected boolean needAroundClosureStacking -
shadowId
public int shadowId -
METHOD_EXECUTION
-
METHOD_CALL
-
CONSTRUCTOR_EXECUTION
-
CONSTRUCTOR_CALL
-
FIELD_GET
-
FIELD_SET
-
STATICINITIALIZATION
-
PREINITIALIZATION
-
INITIALIZATION
-
EXCEPTION_HANDLER
-
SYNCHRONIZATION_LOCK
-
SYNCHRONIZATION_UNLOCK
-
ADVICE_EXECUTION
-
MethodCall
These names are the ones that will be returned by thisJoinPoint.getKind() Those need to be documented somewhere -
ConstructorCall
-
MethodExecution
-
ConstructorExecution
-
FieldGet
-
FieldSet
-
StaticInitialization
-
PreInitialization
-
AdviceExecution
-
Initialization
-
ExceptionHandler
-
SynchronizationLock
-
SynchronizationUnlock
-
MethodCallBit
public static final int MethodCallBit- See Also:
- Constant Field Values
-
ConstructorCallBit
public static final int ConstructorCallBit- See Also:
- Constant Field Values
-
MethodExecutionBit
public static final int MethodExecutionBit- See Also:
- Constant Field Values
-
ConstructorExecutionBit
public static final int ConstructorExecutionBit- See Also:
- Constant Field Values
-
FieldGetBit
public static final int FieldGetBit- See Also:
- Constant Field Values
-
FieldSetBit
public static final int FieldSetBit- See Also:
- Constant Field Values
-
StaticInitializationBit
public static final int StaticInitializationBit- See Also:
- Constant Field Values
-
PreInitializationBit
public static final int PreInitializationBit- See Also:
- Constant Field Values
-
AdviceExecutionBit
public static final int AdviceExecutionBit- See Also:
- Constant Field Values
-
InitializationBit
public static final int InitializationBit- See Also:
- Constant Field Values
-
ExceptionHandlerBit
public static final int ExceptionHandlerBit- See Also:
- Constant Field Values
-
SynchronizationLockBit
public static final int SynchronizationLockBit- See Also:
- Constant Field Values
-
SynchronizationUnlockBit
public static final int SynchronizationUnlockBit- See Also:
- Constant Field Values
-
MAX_SHADOW_KIND
public static final int MAX_SHADOW_KIND- See Also:
- Constant Field Values
-
SHADOW_KINDS
-
ALL_SHADOW_KINDS_BITS
public static final int ALL_SHADOW_KINDS_BITS -
NO_SHADOW_KINDS_BITS
public static final int NO_SHADOW_KINDS_BITS
-
-
Constructor Details
-
Shadow
-
-
Method Details
-
getIWorld
-
getMungers
-
hasThis
public final boolean hasThis()could this(*) pcd ever match -
getThisType
the type of the this object here- Throws:
IllegalStateException- if there is no this here
-
getThisVar
a var referencing this- Throws:
IllegalStateException- if there is no target here
-
hasTarget
public final boolean hasTarget()could target(*) pcd ever match -
getTargetType
the type of the target object here- Throws:
IllegalStateException- if there is no target here
-
getTargetVar
a var referencing the target- Throws:
IllegalStateException- if there is no target here
-
getArgTypes
-
isShadowForArrayConstructionJoinpoint
public boolean isShadowForArrayConstructionJoinpoint() -
isShadowForMonitor
public boolean isShadowForMonitor() -
getArgumentTypesForArrayConstructionShadow
-
getGenericArgTypes
-
getArgType
-
getArgCount
public int getArgCount() -
getEnclosingType
-
getArgVar
-
getThisJoinPointVar
-
getThisJoinPointStaticPartVar
-
getThisEnclosingJoinPointStaticPartVar
-
getThisAspectInstanceVar
-
getKindedAnnotationVar
-
getWithinAnnotationVar
-
getWithinCodeAnnotationVar
-
getThisAnnotationVar
-
getTargetAnnotationVar
-
getArgAnnotationVar
-
getEnclosingCodeSignature
-
getKind
returns the kind of shadow this is, representing what happens under this shadow -
getSignature
returns the signature of the thing under this shadow -
getMatchingSignature
returns the signature of the thing under this shadow, with any synthetic arguments removed -
setMatchingSignature
-
getResolvedSignature
returns the resolved signature of the thing under this shadow -
getReturnType
-
howMany
public static int howMany(int i)Return count of how many bits set in the supplied parameter. -
checkMunger
Only does the check if the munger requires it (@AJ aspects don't)- Parameters:
munger-- Returns:
-
checkCanThrow
-
addMunger
-
implement
public final void implement() -
prepareForMungers
protected void prepareForMungers()Prepare the shadow for implementation. After this is done, the shadow should be in such a position that each munger simply needs to be implemented. -
getSourceLocation
-
toString
-
toResolvedString
-
toSet
Convert a bit array for the shadow kinds into a set of them... should only be used for testing - mainline code should do bit manipulation!
-