Top Inners Fields Constructors Methods
org.aspectj.weaver

public abstract Class Shadow

extends Object
Class Inheritance
Known Direct Subclasses
org.aspectj.weaver.bcel.BcelShadow, org.aspectj.weaver.reflect.ReflectionShadow, org.aspectj.weaver.reflect.StandardShadow
Imports
java.io.DataInputStream, .IOException, java.lang.reflect.Modifier, java.util.ArrayList, .Collections, .HashSet, .List, .Set, org.aspectj.bridge.IMessage, .ISourceLocation, .MessageUtil, org.aspectj.util.PartialOrder, .TypeSafeEnum, org.aspectj.weaver.ast.Var

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Shadow.Kind

A type-safe enum representing the kind of shadows

Field Summary

Modifier and TypeField and Description
public static String
public static final Shadow.Kind
public static final int
public static final int
public static String
public static String
public static final Shadow.Kind
public static final int
public static final Shadow.Kind
public static final int
protected final Shadow
public static String
public static final Shadow.Kind
public static final int
public static String
public static String
public static final Shadow.Kind
public static final int
public static final Shadow.Kind
public static final int
public static String
public static final Shadow.Kind
public static final int
private final Shadow.Kind
private Member
public static final int
public static String
public static String
public static final Shadow.Kind
MethodCall

These names are the ones that will be returned by thisJoinPoint.getKind() Those need to be documented somewhere

public static final int
public static final Shadow.Kind
public static final int
protected List<ShadowMunger>
protected boolean
private static int
public static final int
public static String
public static final Shadow.Kind
public static final int
private ResolvedMember
public static final Shadow.Kind[]
public int
private final Member
public static String
public static final Shadow.Kind
public static final int
public static String
public static String
public static final Shadow.Kind
public static final int
public static final Shadow.Kind
public static final int

Constructor Summary

AccessConstructor and Description
protected
Shadow(Shadow.Kind kind, Member signature, Shadow enclosingShadow)

Method Summary

Modifier and TypeMethod and Description
public void
protected boolean
checkCanThrow(ShadowMunger munger, ResolvedType resolvedTypeX)

protected boolean
checkMunger(ShadowMunger munger)

Only does the check if the munger requires it (@AJ aspects don't)

public abstract Var
getArgAnnotationVar(int i, UnresolvedType forAnnotationType)

public int
public UnresolvedType
getArgType(int arg)

public UnresolvedType[]
public ResolvedType[]
public abstract Var
getArgVar(int i)

public abstract Member
public abstract UnresolvedType
public UnresolvedType[]
public abstract World
public Shadow.Kind
getKind()

returns the kind of shadow this is, representing what happens under this shadow

public abstract Var
public Member
getMatchingSignature()

returns the signature of the thing under this shadow, with any synthetic arguments removed

public List<ShadowMunger>
public ResolvedMember
getResolvedSignature()

returns the resolved signature of the thing under this shadow

public UnresolvedType
public Member
getSignature()

returns the signature of the thing under this shadow

public abstract ISourceLocation
public abstract Var
public final UnresolvedType
getTargetType()

the type of the target object here

public abstract Var
getTargetVar()

a var referencing the target

public abstract Var
public abstract Var
public abstract Var
public abstract Var
public abstract Var
public final UnresolvedType
getThisType()

the type of the this object here

public abstract Var
getThisVar()

a var referencing this

public abstract Var
public abstract Var
public final boolean
hasTarget()

could target(*) pcd ever match

public final boolean
hasThis()

could this(*) pcd ever match

public static int
howMany(int i)

Return count of how many bits set in the supplied parameter.

public final void
private void
implementMungers()

Actually implement the (non-empty) mungers associated with this shadow

private boolean
isDeclaredException(ResolvedType resolvedTypeX, Member member)

public boolean
public boolean
private void
protected void
prepareForMungers()

Prepare the shadow for implementation.

public void
private void
public String
public static Set<Shadow.Kind>
toSet(int i)

Convert a bit array for the shadow kinds into a set of them...

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

ADVICE_EXECUTIONback to summary
public static String ADVICE_EXECUTION
AdviceExecutionback to summary
public static final Shadow.Kind AdviceExecution
AdviceExecutionBitback to summary
public static final int AdviceExecutionBit
ALL_SHADOW_KINDS_BITSback to summary
public static final int ALL_SHADOW_KINDS_BITS
CONSTRUCTOR_CALLback to summary
public static String CONSTRUCTOR_CALL
CONSTRUCTOR_EXECUTIONback to summary
public static String CONSTRUCTOR_EXECUTION
ConstructorCallback to summary
public static final Shadow.Kind ConstructorCall
ConstructorCallBitback to summary
public static final int ConstructorCallBit
ConstructorExecutionback to summary
public static final Shadow.Kind ConstructorExecution
ConstructorExecutionBitback to summary
public static final int ConstructorExecutionBit
enclosingShadowback to summary
protected final Shadow enclosingShadow
EXCEPTION_HANDLERback to summary
public static String EXCEPTION_HANDLER
ExceptionHandlerback to summary
public static final Shadow.Kind ExceptionHandler
ExceptionHandlerBitback to summary
public static final int ExceptionHandlerBit
FIELD_GETback to summary
public static String FIELD_GET
FIELD_SETback to summary
public static String FIELD_SET
FieldGetback to summary
public static final Shadow.Kind FieldGet
FieldGetBitback to summary
public static final int FieldGetBit
FieldSetback to summary
public static final Shadow.Kind FieldSet
FieldSetBitback to summary
public static final int FieldSetBit
INITIALIZATIONback to summary
public static String INITIALIZATION
Initializationback to summary
public static final Shadow.Kind Initialization
InitializationBitback to summary
public static final int InitializationBit
kindback to summary
private final Shadow.Kind kind
matchingSignatureback to summary
private Member matchingSignature
MAX_SHADOW_KINDback to summary
public static final int MAX_SHADOW_KIND
METHOD_CALLback to summary
public static String METHOD_CALL
METHOD_EXECUTIONback to summary
public static String METHOD_EXECUTION
MethodCallback to summary
public static final Shadow.Kind MethodCall

These names are the ones that will be returned by thisJoinPoint.getKind() Those need to be documented somewhere

MethodCallBitback to summary
public static final int MethodCallBit
MethodExecutionback to summary
public static final Shadow.Kind MethodExecution
MethodExecutionBitback to summary
public static final int MethodExecutionBit
mungersback to summary
protected List<ShadowMunger> mungers
needAroundClosureStackingback to summary
protected boolean needAroundClosureStacking
nextShadowIDback to summary
private static int nextShadowID
NO_SHADOW_KINDS_BITSback to summary
public static final int NO_SHADOW_KINDS_BITS
PREINITIALIZATIONback to summary
public static String PREINITIALIZATION
PreInitializationback to summary
public static final Shadow.Kind PreInitialization
PreInitializationBitback to summary
public static final int PreInitializationBit
resolvedSignatureback to summary
private ResolvedMember resolvedSignature
SHADOW_KINDSback to summary
public static final Shadow.Kind[] SHADOW_KINDS
shadowIdback to summary
public int shadowId
signatureback to summary
private final Member signature
STATICINITIALIZATIONback to summary
public static String STATICINITIALIZATION
StaticInitializationback to summary
public static final Shadow.Kind StaticInitialization
StaticInitializationBitback to summary
public static final int StaticInitializationBit
SYNCHRONIZATION_LOCKback to summary
public static String SYNCHRONIZATION_LOCK
SYNCHRONIZATION_UNLOCKback to summary
public static String SYNCHRONIZATION_UNLOCK
SynchronizationLockback to summary
public static final Shadow.Kind SynchronizationLock
SynchronizationLockBitback to summary
public static final int SynchronizationLockBit
SynchronizationUnlockback to summary
public static final Shadow.Kind SynchronizationUnlock
SynchronizationUnlockBitback to summary
public static final int SynchronizationUnlockBit

Constructor Detail

Shadowback to summary
protected Shadow(Shadow.Kind kind, Member signature, Shadow enclosingShadow)

Method Detail

addMungerback to summary
public void addMunger(ShadowMunger munger)
checkCanThrowback to summary
protected boolean checkCanThrow(ShadowMunger munger, ResolvedType resolvedTypeX)
checkMungerback to summary
protected boolean checkMunger(ShadowMunger munger)

Only does the check if the munger requires it (@AJ aspects don't)

getArgAnnotationVarback to summary
public abstract Var getArgAnnotationVar(int i, UnresolvedType forAnnotationType)
getArgCountback to summary
public int getArgCount()
getArgTypeback to summary
public UnresolvedType getArgType(int arg)
getArgTypesback to summary
public UnresolvedType[] getArgTypes()
getArgumentTypesForArrayConstructionShadowback to summary
public ResolvedType[] getArgumentTypesForArrayConstructionShadow()
getArgVarback to summary
public abstract Var getArgVar(int i)
getEnclosingCodeSignatureback to summary
public abstract Member getEnclosingCodeSignature()
getEnclosingTypeback to summary
public abstract UnresolvedType getEnclosingType()
getGenericArgTypesback to summary
public UnresolvedType[] getGenericArgTypes()
getIWorldback to summary
public abstract World getIWorld()
getKindback to summary
public Shadow.Kind getKind()

returns the kind of shadow this is, representing what happens under this shadow

getKindedAnnotationVarback to summary
public abstract Var getKindedAnnotationVar(UnresolvedType forAnnotationType)
getMatchingSignatureback to summary
public Member getMatchingSignature()

returns the signature of the thing under this shadow, with any synthetic arguments removed

getMungersback to summary
public List<ShadowMunger> getMungers()
getResolvedSignatureback to summary
public ResolvedMember getResolvedSignature()

returns the resolved signature of the thing under this shadow

getReturnTypeback to summary
public UnresolvedType getReturnType()
getSignatureback to summary
public Member getSignature()

returns the signature of the thing under this shadow

getSourceLocationback to summary
public abstract ISourceLocation getSourceLocation()
getTargetAnnotationVarback to summary
public abstract Var getTargetAnnotationVar(UnresolvedType forAnnotationType)
getTargetTypeback to summary
public final UnresolvedType getTargetType()

the type of the target object here

Exceptions
IllegalStateException:
if there is no target here
getTargetVarback to summary
public abstract Var getTargetVar()

a var referencing the target

Exceptions
IllegalStateException:
if there is no target here
getThisAnnotationVarback to summary
public abstract Var getThisAnnotationVar(UnresolvedType forAnnotationType)
getThisAspectInstanceVarback to summary
public abstract Var getThisAspectInstanceVar(ResolvedType aspectType)
getThisEnclosingJoinPointStaticPartVarback to summary
public abstract Var getThisEnclosingJoinPointStaticPartVar()
getThisJoinPointStaticPartVarback to summary
public abstract Var getThisJoinPointStaticPartVar()
getThisJoinPointVarback to summary
public abstract Var getThisJoinPointVar()
getThisTypeback to summary
public final UnresolvedType getThisType()

the type of the this object here

Exceptions
IllegalStateException:
if there is no this here
getThisVarback to summary
public abstract Var getThisVar()

a var referencing this

Exceptions
IllegalStateException:
if there is no target here
getWithinAnnotationVarback to summary
public abstract Var getWithinAnnotationVar(UnresolvedType forAnnotationType)
getWithinCodeAnnotationVarback to summary
public abstract Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType)
hasTargetback to summary
public final boolean hasTarget()

could target(*) pcd ever match

hasThisback to summary
public final boolean hasThis()

could this(*) pcd ever match

howManyback to summary
public static int howMany(int i)

Return count of how many bits set in the supplied parameter.

implementback to summary
public final void implement()
implementMungersback to summary
private void implementMungers()

Actually implement the (non-empty) mungers associated with this shadow

isDeclaredExceptionback to summary
private boolean isDeclaredException(ResolvedType resolvedTypeX, Member member)
isShadowForArrayConstructionJoinpointback to summary
public boolean isShadowForArrayConstructionJoinpoint()
isShadowForMonitorback to summary
public boolean isShadowForMonitor()
possiblyReportUnorderedAdviceback to summary
private void possiblyReportUnorderedAdvice(List<ShadowMunger> sorted)
prepareForMungersback to summary
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.

setMatchingSignatureback to summary
public void setMatchingSignature(Member member)
sortMungersback to summary
private void sortMungers()
toResolvedStringback to summary
public String toResolvedString(World world)
toSetback to summary
public static Set<Shadow.Kind> toSet(int i)

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!

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

org.aspectj.weaver back to summary

public final Class Shadow.Kind

extends TypeSafeEnum
Class Inheritance

A type-safe enum representing the kind of shadows

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
Kind(String name, int key, boolean argsOnStack)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public String
public boolean
public boolean
hasReturnValue()

These shadow kinds have return values that can be bound in after returning(Dooberry doo) advice.

public boolean
isEnclosingKind()

These are all the shadows that contains other shadows within them and are often directly associated with methods.

public boolean
isSet(int i)

public boolean
public boolean
public boolean
public static Shadow.Kind
public String
Inherited from org.aspectj.util.TypeSafeEnum:
equalsgetKeygetNamehashCodetoStringwrite

Field Detail

bitback to summary
public int bit
hasReturnValueFlagback to summary
private static final int hasReturnValueFlag
isEnclosingKindFlagback to summary
private static final int isEnclosingKindFlag
isTargetSameAsThisFlagback to summary
private static final int isTargetSameAsThisFlag
neverHasTargetFlagback to summary
private static final int neverHasTargetFlag
neverHasThisFlagback to summary
private static final int neverHasThisFlag

Constructor Detail

Kindback to summary
public Kind(String name, int key, boolean argsOnStack)

Method Detail

allowsExtractionback to summary
public boolean allowsExtraction()
argsOnStackback to summary
public boolean argsOnStack()
getSimpleNameback to summary
public String getSimpleName()
hasHighPriorityExceptionsback to summary
public boolean hasHighPriorityExceptions()
hasReturnValueback to summary
public boolean hasReturnValue()

These shadow kinds have return values that can be bound in after returning(Dooberry doo) advice.

isEnclosingKindback to summary
public boolean isEnclosingKind()

These are all the shadows that contains other shadows within them and are often directly associated with methods.

isSetback to summary
public boolean isSet(int i)
isTargetSameAsThisback to summary
public boolean isTargetSameAsThis()
neverHasTargetback to summary
public boolean neverHasTarget()
neverHasThisback to summary
public boolean neverHasThis()
readback to summary
public static Shadow.Kind read(DataInputStream s) throws IOException
toLegalJavaIdentifierback to summary
public String toLegalJavaIdentifier()