public class BcelShadow extends Shadow
Shadow.Kind
Modifier and Type | Field and Description |
---|---|
static boolean |
appliedLazyTjpOptimization |
ADVICE_EXECUTION, AdviceExecution, AdviceExecutionBit, ALL_SHADOW_KINDS_BITS, CONSTRUCTOR_CALL, CONSTRUCTOR_EXECUTION, ConstructorCall, ConstructorCallBit, ConstructorExecution, ConstructorExecutionBit, enclosingShadow, EXCEPTION_HANDLER, ExceptionHandler, ExceptionHandlerBit, FIELD_GET, FIELD_SET, FieldGet, FieldGetBit, FieldSet, FieldSetBit, Initialization, INITIALIZATION, InitializationBit, MAX_SHADOW_KIND, METHOD_CALL, METHOD_EXECUTION, MethodCall, MethodCallBit, MethodExecution, MethodExecutionBit, mungers, NO_SHADOW_KINDS_BITS, PreInitialization, PREINITIALIZATION, PreInitializationBit, SHADOW_KINDS, shadowId, StaticInitialization, STATICINITIALIZATION, StaticInitializationBit, SYNCHRONIZATION_LOCK, SYNCHRONIZATION_UNLOCK, SynchronizationLock, SynchronizationLockBit, SynchronizationUnlock, SynchronizationUnlockBit
Constructor and Description |
---|
BcelShadow(BcelWorld world,
Shadow.Kind kind,
Member signature,
LazyMethodGen enclosingMethod,
BcelShadow enclosingShadow)
This generates an unassociated shadow, rooted in a particular method but not rooted to any particular point in the code.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdvicePreventingLazyTjp(org.aspectj.weaver.bcel.BcelAdvice advice) |
boolean |
arg0HoldsThis()
Is arg0 occupied with the value of this
|
BcelShadow |
copyInto(LazyMethodGen recipient,
BcelShadow enclosing) |
void |
ensureInitializedArgVar(int argNumber) |
UnresolvedType |
ensureTargetTypeIsCorrect(UnresolvedType tx) |
BcelVar |
genTempVar(UnresolvedType utype) |
BcelVar |
genTempVar(UnresolvedType typeX,
java.lang.String localName) |
java.lang.String |
getActualTargetType() |
protected ResolvedType[] |
getAnnotations(ResolvedMember foundMember,
Member relevantMember,
ResolvedType relevantType) |
Var |
getArgAnnotationVar(int i,
UnresolvedType forAnnotationType) |
Var |
getArgVar(int i) |
LazyClassGen |
getEnclosingClass() |
Member |
getEnclosingCodeSignature() |
LazyMethodGen |
getEnclosingMethod() |
Shadow |
getEnclosingShadow() |
ResolvedType |
getEnclosingType() |
InstructionFactory |
getFactory() |
World |
getIWorld() |
Var |
getKindedAnnotationVar(UnresolvedType forAnnotationType) |
org.aspectj.weaver.bcel.ShadowRange |
getRange() |
Member |
getRealEnclosingCodeSignature() |
protected ResolvedMember |
getRelevantMember(ResolvedMember foundMember,
Member relevantMember,
ResolvedType relevantType) |
int |
getSourceLine() |
ISourceLocation |
getSourceLocation() |
Var |
getTargetAnnotationVar(UnresolvedType forAnnotationType) |
Var |
getTargetVar()
a var referencing the target
|
Var |
getThisAnnotationVar(UnresolvedType forAnnotationType) |
BcelVar |
getThisAspectInstanceVar(ResolvedType aspectType) |
BcelVar |
getThisEnclosingJoinPointStaticPartBcelVar()
Get the Var for the enclosingJpStaticPart
|
Var |
getThisEnclosingJoinPointStaticPartVar() |
BcelVar |
getThisJoinPointStaticPartBcelVar() |
BcelVar |
getThisJoinPointStaticPartBcelVar(boolean isEnclosingJp)
Get the Var for the xxxxJpStaticPart, xxx = this or enclosing
|
Var |
getThisJoinPointStaticPartVar() |
Var |
getThisJoinPointVar() |
Var |
getThisVar()
a var referencing this
|
Var |
getWithinAnnotationVar(UnresolvedType forAnnotationType) |
Var |
getWithinCodeAnnotationVar(UnresolvedType forAnnotationType) |
BcelWorld |
getWorld() |
void |
init() |
void |
initializeArgVars()
Initialize all the available arguments at the shadow.
|
void |
initializeForAroundClosure() |
void |
initializeKindedAnnotationVars()
By determining what "kind" of shadow we are, we can find out the annotations on the appropriate element (method, field,
constructor, type).
|
void |
initializeTargetAnnotationVars() |
void |
initializeTargetVar() |
void |
initializeThisAnnotationVars() |
void |
initializeWithinAnnotationVars() |
void |
initializeWithinCodeAnnotationVars() |
void |
initIfaceInitializer(InstructionHandle end) |
boolean |
isFallsThrough() |
static BcelShadow |
makeAdviceExecution(BcelWorld world,
LazyMethodGen enclosingMethod) |
static BcelShadow |
makeArrayConstructorCall(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle arrayInstruction,
BcelShadow enclosingShadow) |
static BcelShadow |
makeConstructorCall(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle callHandle,
BcelShadow enclosingShadow) |
static BcelShadow |
makeConstructorExecution(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle justBeforeStart) |
static BcelShadow |
makeExceptionHandler(BcelWorld world,
ExceptionRange exceptionRange,
LazyMethodGen enclosingMethod,
InstructionHandle startOfHandler,
BcelShadow enclosingShadow)
Make the shadow for an exception handler.
|
static BcelShadow |
makeFieldGet(BcelWorld world,
ResolvedMember field,
LazyMethodGen enclosingMethod,
InstructionHandle getHandle,
BcelShadow enclosingShadow) |
static BcelShadow |
makeFieldSet(BcelWorld world,
ResolvedMember field,
LazyMethodGen enclosingMethod,
InstructionHandle setHandle,
BcelShadow enclosingShadow) |
static BcelShadow |
makeIfaceInitialization(BcelWorld world,
LazyMethodGen constructor,
Member interfaceConstructorSignature)
create an init join point associated w/ an interface in the body of a constructor
|
static BcelShadow |
makeMethodCall(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle callHandle,
BcelShadow enclosingShadow) |
static BcelShadow |
makeMethodExecution(BcelWorld world,
LazyMethodGen enclosingMethod) |
static BcelShadow |
makeMethodExecution(BcelWorld world,
LazyMethodGen enclosingMethod,
boolean lazyInit) |
static BcelShadow |
makeMonitorEnter(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle monitorInstruction,
BcelShadow enclosingShadow) |
static BcelShadow |
makeMonitorExit(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle monitorInstruction,
BcelShadow enclosingShadow) |
static BcelShadow |
makeShadowForMethod(BcelWorld world,
LazyMethodGen enclosingMethod,
Shadow.Kind kind,
Member sig) |
static BcelShadow |
makeShadowForMethodCall(BcelWorld world,
LazyMethodGen enclosingMethod,
InstructionHandle callHandle,
BcelShadow enclosingShadow,
Shadow.Kind kind,
ResolvedMember sig) |
static BcelShadow |
makeStaticInitialization(BcelWorld world,
LazyMethodGen enclosingMethod) |
static BcelShadow |
makeUnfinishedInitialization(BcelWorld world,
LazyMethodGen constructor)
Create an initialization join point associated with a constructor, but not with any body of code yet.
|
static BcelShadow |
makeUnfinishedPreinitialization(BcelWorld world,
LazyMethodGen constructor) |
protected void |
prepareForMungers()
Prepare the shadow for implementation.
|
void |
requireThisJoinPoint(boolean hasGuardTest,
boolean isAround) |
static void |
retargetAllBranches(InstructionHandle from,
InstructionHandle to) |
void |
setActualTargetType(java.lang.String className) |
void |
setRange(org.aspectj.weaver.bcel.ShadowRange range) |
boolean |
terminatesWithReturn()
If the end of my range has no real instructions following then my context needs a return at the end.
|
void |
weaveAfter(org.aspectj.weaver.bcel.BcelAdvice munger) |
void |
weaveAfterReturning(org.aspectj.weaver.bcel.BcelAdvice munger)
The basic strategy here is to add a set of instructions at the end of the shadow range that dispatch the advice, and then
return whatever the shadow was going to return anyway.
|
void |
weaveAfterThrowing(org.aspectj.weaver.bcel.BcelAdvice munger,
UnresolvedType catchType) |
void |
weaveAroundClosure(org.aspectj.weaver.bcel.BcelAdvice munger,
boolean hasDynamicTest) |
void |
weaveAroundInline(org.aspectj.weaver.bcel.BcelAdvice munger,
boolean hasDynamicTest) |
void |
weaveCflowEntry(org.aspectj.weaver.bcel.BcelAdvice munger,
Member cflowField) |
void |
weavePerObjectEntry(org.aspectj.weaver.bcel.BcelAdvice munger,
BcelVar onVar) |
void |
weavePerTypeWithinAspectInitialization(org.aspectj.weaver.bcel.BcelAdvice munger,
UnresolvedType t)
Causes the aspect instance to be *set* for later retrievable through localAspectof()/aspectOf()
|
void |
weaveSoftener(org.aspectj.weaver.bcel.BcelAdvice munger,
UnresolvedType catchType) |
addMunger, checkCanThrow, checkMunger, getArgCount, getArgType, getArgTypes, getArgumentTypesForArrayConstructionShadow, getGenericArgTypes, getKind, getMatchingSignature, getMungers, getResolvedSignature, getReturnType, getSignature, getTargetType, getThisType, hasTarget, hasThis, howMany, implement, isShadowForArrayConstructionJoinpoint, isShadowForMonitor, setMatchingSignature, toResolvedString, toSet, toString
public BcelShadow(BcelWorld world, Shadow.Kind kind, Member signature, LazyMethodGen enclosingMethod, BcelShadow enclosingShadow)
ShadowRange.associateWithShadow(BcelShadow)
method.public BcelShadow copyInto(LazyMethodGen recipient, BcelShadow enclosing)
public void addAdvicePreventingLazyTjp(org.aspectj.weaver.bcel.BcelAdvice advice)
protected void prepareForMungers()
Shadow
prepareForMungers
in class Shadow
public org.aspectj.weaver.bcel.ShadowRange getRange()
public void setRange(org.aspectj.weaver.bcel.ShadowRange range)
public int getSourceLine()
public ResolvedType getEnclosingType()
getEnclosingType
in class Shadow
public LazyClassGen getEnclosingClass()
public BcelWorld getWorld()
public static BcelShadow makeConstructorExecution(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle justBeforeStart)
public static BcelShadow makeStaticInitialization(BcelWorld world, LazyMethodGen enclosingMethod)
public static BcelShadow makeExceptionHandler(BcelWorld world, ExceptionRange exceptionRange, LazyMethodGen enclosingMethod, InstructionHandle startOfHandler, BcelShadow enclosingShadow)
public static BcelShadow makeIfaceInitialization(BcelWorld world, LazyMethodGen constructor, Member interfaceConstructorSignature)
public void initIfaceInitializer(InstructionHandle end)
public static BcelShadow makeUnfinishedInitialization(BcelWorld world, LazyMethodGen constructor)
constructor
- The constructor starting this initialization.public static BcelShadow makeUnfinishedPreinitialization(BcelWorld world, LazyMethodGen constructor)
public static BcelShadow makeMethodExecution(BcelWorld world, LazyMethodGen enclosingMethod, boolean lazyInit)
public void init()
public static BcelShadow makeMethodExecution(BcelWorld world, LazyMethodGen enclosingMethod)
public static BcelShadow makeShadowForMethod(BcelWorld world, LazyMethodGen enclosingMethod, Shadow.Kind kind, Member sig)
public static BcelShadow makeAdviceExecution(BcelWorld world, LazyMethodGen enclosingMethod)
public static BcelShadow makeConstructorCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow)
public static BcelShadow makeArrayConstructorCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle arrayInstruction, BcelShadow enclosingShadow)
public static BcelShadow makeMonitorEnter(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle monitorInstruction, BcelShadow enclosingShadow)
public static BcelShadow makeMonitorExit(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle monitorInstruction, BcelShadow enclosingShadow)
public static BcelShadow makeMethodCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow)
public static BcelShadow makeShadowForMethodCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow, Shadow.Kind kind, ResolvedMember sig)
public static BcelShadow makeFieldGet(BcelWorld world, ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle getHandle, BcelShadow enclosingShadow)
public static BcelShadow makeFieldSet(BcelWorld world, ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle setHandle, BcelShadow enclosingShadow)
public static void retargetAllBranches(InstructionHandle from, InstructionHandle to)
public boolean terminatesWithReturn()
public boolean arg0HoldsThis()
public Var getThisVar()
Shadow
getThisVar
in class Shadow
public Var getThisAnnotationVar(UnresolvedType forAnnotationType)
getThisAnnotationVar
in class Shadow
public Var getTargetVar()
Shadow
getTargetVar
in class Shadow
public Var getTargetAnnotationVar(UnresolvedType forAnnotationType)
getTargetAnnotationVar
in class Shadow
public Var getArgAnnotationVar(int i, UnresolvedType forAnnotationType)
getArgAnnotationVar
in class Shadow
public Var getKindedAnnotationVar(UnresolvedType forAnnotationType)
getKindedAnnotationVar
in class Shadow
public Var getWithinAnnotationVar(UnresolvedType forAnnotationType)
getWithinAnnotationVar
in class Shadow
public Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType)
getWithinCodeAnnotationVar
in class Shadow
public final Var getThisJoinPointStaticPartVar()
getThisJoinPointStaticPartVar
in class Shadow
public final Var getThisEnclosingJoinPointStaticPartVar()
getThisEnclosingJoinPointStaticPartVar
in class Shadow
public void requireThisJoinPoint(boolean hasGuardTest, boolean isAround)
public Var getThisJoinPointVar()
getThisJoinPointVar
in class Shadow
public BcelVar getThisJoinPointStaticPartBcelVar()
public BcelVar getThisAspectInstanceVar(ResolvedType aspectType)
getThisAspectInstanceVar
in class Shadow
public BcelVar getThisJoinPointStaticPartBcelVar(boolean isEnclosingJp)
isEnclosingJp
- true to have the enclosingJpStaticPartpublic BcelVar getThisEnclosingJoinPointStaticPartBcelVar()
public Member getEnclosingCodeSignature()
getEnclosingCodeSignature
in class Shadow
public Member getRealEnclosingCodeSignature()
public void initializeTargetVar()
public UnresolvedType ensureTargetTypeIsCorrect(UnresolvedType tx)
public void ensureInitializedArgVar(int argNumber)
public void initializeArgVars()
public void initializeForAroundClosure()
public void initializeThisAnnotationVars()
public void initializeTargetAnnotationVars()
protected ResolvedMember getRelevantMember(ResolvedMember foundMember, Member relevantMember, ResolvedType relevantType)
protected ResolvedType[] getAnnotations(ResolvedMember foundMember, Member relevantMember, ResolvedType relevantType)
public void initializeKindedAnnotationVars()
public void initializeWithinAnnotationVars()
public void initializeWithinCodeAnnotationVars()
public void weaveAfter(org.aspectj.weaver.bcel.BcelAdvice munger)
public void weaveAfterReturning(org.aspectj.weaver.bcel.BcelAdvice munger)
public void weaveAfterThrowing(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType catchType)
public void weaveSoftener(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType catchType)
public void weavePerObjectEntry(org.aspectj.weaver.bcel.BcelAdvice munger, BcelVar onVar)
public void weavePerTypeWithinAspectInitialization(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType t)
public void weaveCflowEntry(org.aspectj.weaver.bcel.BcelAdvice munger, Member cflowField)
public void weaveAroundInline(org.aspectj.weaver.bcel.BcelAdvice munger, boolean hasDynamicTest)
public void weaveAroundClosure(org.aspectj.weaver.bcel.BcelAdvice munger, boolean hasDynamicTest)
public BcelVar genTempVar(UnresolvedType utype)
public BcelVar genTempVar(UnresolvedType typeX, java.lang.String localName)
public InstructionFactory getFactory()
public ISourceLocation getSourceLocation()
getSourceLocation
in class Shadow
public Shadow getEnclosingShadow()
public LazyMethodGen getEnclosingMethod()
public boolean isFallsThrough()
public void setActualTargetType(java.lang.String className)
public java.lang.String getActualTargetType()