Package org.aspectj.weaver.bcel
Klasse BcelShadow
java.lang.Object
org.aspectj.weaver.Shadow
org.aspectj.weaver.bcel.BcelShadow
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.weaver.Shadow
Shadow.Kind -
Feldübersicht
FelderVon Klasse geerbte Felder org.aspectj.weaver.Shadow
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, needAroundClosureStacking, NO_SHADOW_KINDS_BITS, PreInitialization, PREINITIALIZATION, PreInitializationBit, SHADOW_KINDS, shadowId, StaticInitialization, STATICINITIALIZATION, StaticInitializationBit, SYNCHRONIZATION_LOCK, SYNCHRONIZATION_UNLOCK, SynchronizationLock, SynchronizationLockBit, SynchronizationUnlock, SynchronizationUnlockBit -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBcelShadow(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. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddAdvicePreventingLazyTjp(org.aspectj.weaver.bcel.BcelAdvice advice) booleanIs arg0 occupied with the value of thiscopyInto(LazyMethodGen recipient, BcelShadow enclosing) voidensureInitializedArgVar(int argNumber) genTempVar(UnresolvedType utype) genTempVar(UnresolvedType typeX, String localName) protected ResolvedType[]getAnnotations(ResolvedMember foundMember, Member relevantMember, ResolvedType relevantType) getArgAnnotationVar(int i, UnresolvedType forAnnotationType) getArgVar(int i) getKindedAnnotationVar(UnresolvedType forAnnotationType) org.aspectj.weaver.bcel.ShadowRangegetRange()protected ResolvedMembergetRelevantMember(ResolvedMember foundMember, Member relevantMember, ResolvedType relevantType) intgetTargetAnnotationVar(UnresolvedType forAnnotationType) a var referencing the targetgetThisAnnotationVar(UnresolvedType forAnnotationType) getThisAspectInstanceVar(ResolvedType aspectType) Get the Var for the enclosingJpStaticPartfinal VargetThisJoinPointStaticPartBcelVar(boolean isEnclosingJp) Get the Var for the xxxxJpStaticPart, xxx = this or enclosingfinal Vara var referencing thisgetWithinAnnotationVar(UnresolvedType forAnnotationType) getWithinCodeAnnotationVar(UnresolvedType forAnnotationType) getWorld()voidinit()voidInitialize all the available arguments at the shadow.voidvoidBy determining what "kind" of shadow we are, we can find out the annotations on the appropriate element (method, field, constructor, type).voidvoidvoidvoidvoidvoidbooleanstatic BcelShadowmakeAdviceExecution(BcelWorld world, LazyMethodGen enclosingMethod) static BcelShadowmakeArrayConstructorCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle arrayInstruction, BcelShadow enclosingShadow) static BcelShadowmakeConstructorCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow) static BcelShadowmakeConstructorExecution(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle justBeforeStart) static BcelShadowmakeExceptionHandler(BcelWorld world, ExceptionRange exceptionRange, LazyMethodGen enclosingMethod, InstructionHandle startOfHandler, BcelShadow enclosingShadow) Make the shadow for an exception handler.static BcelShadowmakeFieldGet(BcelWorld world, ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle getHandle, BcelShadow enclosingShadow) static BcelShadowmakeFieldSet(BcelWorld world, ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle setHandle, BcelShadow enclosingShadow) static BcelShadowmakeIfaceInitialization(BcelWorld world, LazyMethodGen constructor, Member interfaceConstructorSignature) create an init join point associated w/ an interface in the body of a constructorstatic BcelShadowmakeMethodCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow) static BcelShadowmakeMethodExecution(BcelWorld world, LazyMethodGen enclosingMethod) static BcelShadowmakeMethodExecution(BcelWorld world, LazyMethodGen enclosingMethod, boolean lazyInit) static BcelShadowmakeMonitorEnter(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle monitorInstruction, BcelShadow enclosingShadow) static BcelShadowmakeMonitorExit(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle monitorInstruction, BcelShadow enclosingShadow) static BcelShadowmakeShadowForMethod(BcelWorld world, LazyMethodGen enclosingMethod, Shadow.Kind kind, Member sig) static BcelShadowmakeShadowForMethodCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow, Shadow.Kind kind, ResolvedMember sig) static BcelShadowmakeStaticInitialization(BcelWorld world, LazyMethodGen enclosingMethod) static BcelShadowmakeUnfinishedInitialization(BcelWorld world, LazyMethodGen constructor) Create an initialization join point associated with a constructor, but not with any body of code yet.static BcelShadowmakeUnfinishedPreinitialization(BcelWorld world, LazyMethodGen constructor) protected voidPrepare the shadow for implementation.voidrequireThisJoinPoint(boolean hasGuardTest, boolean isAround) static voidvoidsetActualTargetType(String className) voidsetRange(org.aspectj.weaver.bcel.ShadowRange range) booleanIf the end of my range has no real instructions following then my context needs a return at the end.voidweaveAfter(org.aspectj.weaver.bcel.BcelAdvice munger) voidweaveAfterReturning(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.voidweaveAfterThrowing(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType catchType) voidweaveAroundClosure(org.aspectj.weaver.bcel.BcelAdvice munger, boolean hasDynamicTest) voidweaveAroundInline(org.aspectj.weaver.bcel.BcelAdvice munger, boolean hasDynamicTest) voidweaveCflowEntry(org.aspectj.weaver.bcel.BcelAdvice munger, Member cflowField) voidweavePerObjectEntry(org.aspectj.weaver.bcel.BcelAdvice munger, BcelVar onVar) voidweavePerTypeWithinAspectInitialization(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType t) Causes the aspect instance to be *set* for later retrievable through localAspectof()/aspectOf()voidweaveSoftener(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType catchType) Von Klasse geerbte Methoden org.aspectj.weaver.Shadow
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
-
Felddetails
-
appliedLazyTjpOptimization
public static boolean appliedLazyTjpOptimization
-
-
Konstruktordetails
-
BcelShadow
public 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. It should be given to a rooted ShadowRange in theShadowRange.associateWithShadow(BcelShadow)method.
-
-
Methodendetails
-
copyInto
-
getIWorld
-
addAdvicePreventingLazyTjp
public void addAdvicePreventingLazyTjp(org.aspectj.weaver.bcel.BcelAdvice advice) -
prepareForMungers
protected void prepareForMungers()Beschreibung aus Klasse kopiert:ShadowPrepare the shadow for implementation. After this is done, the shadow should be in such a position that each munger simply needs to be implemented.- Setzt außer Kraft:
prepareForMungersin KlasseShadow
-
getRange
public org.aspectj.weaver.bcel.ShadowRange getRange() -
setRange
public void setRange(org.aspectj.weaver.bcel.ShadowRange range) -
getSourceLine
public int getSourceLine() -
getEnclosingType
- Angegeben von:
getEnclosingTypein KlasseShadow
-
getEnclosingClass
-
getWorld
-
makeConstructorExecution
public static BcelShadow makeConstructorExecution(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle justBeforeStart) -
makeStaticInitialization
-
makeExceptionHandler
public static BcelShadow makeExceptionHandler(BcelWorld world, ExceptionRange exceptionRange, LazyMethodGen enclosingMethod, InstructionHandle startOfHandler, BcelShadow enclosingShadow) Make the shadow for an exception handler. Currently makes an empty shadow that only allows before advice to be woven into it. -
makeIfaceInitialization
public static BcelShadow makeIfaceInitialization(BcelWorld world, LazyMethodGen constructor, Member interfaceConstructorSignature) create an init join point associated w/ an interface in the body of a constructor -
initIfaceInitializer
-
makeUnfinishedInitialization
Create an initialization join point associated with a constructor, but not with any body of code yet. If this is actually matched, its range will be set when we inline self constructors.- Parameter:
constructor- The constructor starting this initialization.
-
makeUnfinishedPreinitialization
public static BcelShadow makeUnfinishedPreinitialization(BcelWorld world, LazyMethodGen constructor) -
makeMethodExecution
public static BcelShadow makeMethodExecution(BcelWorld world, LazyMethodGen enclosingMethod, boolean lazyInit) -
init
public void init() -
makeMethodExecution
-
makeShadowForMethod
public static BcelShadow makeShadowForMethod(BcelWorld world, LazyMethodGen enclosingMethod, Shadow.Kind kind, Member sig) -
makeAdviceExecution
-
makeConstructorCall
public static BcelShadow makeConstructorCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow) -
makeArrayConstructorCall
public static BcelShadow makeArrayConstructorCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle arrayInstruction, BcelShadow enclosingShadow) -
makeMonitorEnter
public static BcelShadow makeMonitorEnter(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle monitorInstruction, BcelShadow enclosingShadow) -
makeMonitorExit
public static BcelShadow makeMonitorExit(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle monitorInstruction, BcelShadow enclosingShadow) -
makeMethodCall
public static BcelShadow makeMethodCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow) -
makeShadowForMethodCall
public static BcelShadow makeShadowForMethodCall(BcelWorld world, LazyMethodGen enclosingMethod, InstructionHandle callHandle, BcelShadow enclosingShadow, Shadow.Kind kind, ResolvedMember sig) -
makeFieldGet
public static BcelShadow makeFieldGet(BcelWorld world, ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle getHandle, BcelShadow enclosingShadow) -
makeFieldSet
public static BcelShadow makeFieldSet(BcelWorld world, ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle setHandle, BcelShadow enclosingShadow) -
retargetAllBranches
-
terminatesWithReturn
public boolean terminatesWithReturn()If the end of my range has no real instructions following then my context needs a return at the end. -
arg0HoldsThis
public boolean arg0HoldsThis()Is arg0 occupied with the value of this -
getThisVar
Beschreibung aus Klasse kopiert:Shadowa var referencing this- Angegeben von:
getThisVarin KlasseShadow
-
getThisAnnotationVar
- Angegeben von:
getThisAnnotationVarin KlasseShadow
-
getTargetVar
Beschreibung aus Klasse kopiert:Shadowa var referencing the target- Angegeben von:
getTargetVarin KlasseShadow
-
getTargetAnnotationVar
- Angegeben von:
getTargetAnnotationVarin KlasseShadow
-
getArgVar
-
getArgAnnotationVar
- Angegeben von:
getArgAnnotationVarin KlasseShadow
-
getKindedAnnotationVar
- Angegeben von:
getKindedAnnotationVarin KlasseShadow
-
getWithinAnnotationVar
- Angegeben von:
getWithinAnnotationVarin KlasseShadow
-
getWithinCodeAnnotationVar
- Angegeben von:
getWithinCodeAnnotationVarin KlasseShadow
-
getThisJoinPointStaticPartVar
- Angegeben von:
getThisJoinPointStaticPartVarin KlasseShadow
-
getThisEnclosingJoinPointStaticPartVar
- Angegeben von:
getThisEnclosingJoinPointStaticPartVarin KlasseShadow
-
requireThisJoinPoint
public void requireThisJoinPoint(boolean hasGuardTest, boolean isAround) -
getThisJoinPointVar
- Angegeben von:
getThisJoinPointVarin KlasseShadow
-
getThisJoinPointStaticPartBcelVar
-
getThisAspectInstanceVar
- Angegeben von:
getThisAspectInstanceVarin KlasseShadow
-
getThisJoinPointStaticPartBcelVar
Get the Var for the xxxxJpStaticPart, xxx = this or enclosing- Parameter:
isEnclosingJp- true to have the enclosingJpStaticPart- Gibt zurück:
-
getThisEnclosingJoinPointStaticPartBcelVar
Get the Var for the enclosingJpStaticPart- Gibt zurück:
-
getEnclosingCodeSignature
- Angegeben von:
getEnclosingCodeSignaturein KlasseShadow
-
getRealEnclosingCodeSignature
-
initializeTargetVar
public void initializeTargetVar() -
ensureTargetTypeIsCorrect
-
ensureInitializedArgVar
public void ensureInitializedArgVar(int argNumber) -
initializeArgVars
public void initializeArgVars()Initialize all the available arguments at the shadow. This means creating a copy of them that we can then use for advice calls (the copy ensures we are not affected by other advice changing the values). This method initializes all arguments whereas the method ensureInitializedArgVar will only ensure a single argument is setup. -
initializeForAroundClosure
public void initializeForAroundClosure() -
initializeThisAnnotationVars
public void initializeThisAnnotationVars() -
initializeTargetAnnotationVars
public void initializeTargetAnnotationVars() -
getRelevantMember
protected ResolvedMember getRelevantMember(ResolvedMember foundMember, Member relevantMember, ResolvedType relevantType) -
getAnnotations
protected ResolvedType[] getAnnotations(ResolvedMember foundMember, Member relevantMember, ResolvedType relevantType) -
initializeKindedAnnotationVars
public void initializeKindedAnnotationVars()By determining what "kind" of shadow we are, we can find out the annotations on the appropriate element (method, field, constructor, type). Then create one BcelVar entry in the map for each annotation, keyed by annotation type. -
initializeWithinAnnotationVars
public void initializeWithinAnnotationVars() -
initializeWithinCodeAnnotationVars
public void initializeWithinCodeAnnotationVars() -
weaveAfter
public void weaveAfter(org.aspectj.weaver.bcel.BcelAdvice munger) -
weaveAfterReturning
public 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. To achieve this, we note all the return statements in the advice, and replace them with code that: 1) stores the return value on top of the stack in a temp var 2) jumps to the start of our advice block 3) restores the return value at the end of the advice block before ultimately returning We also need to bind the return value into a returning parameter, if the advice specified one. -
weaveAfterThrowing
-
weaveSoftener
-
weavePerObjectEntry
-
weavePerTypeWithinAspectInitialization
public void weavePerTypeWithinAspectInitialization(org.aspectj.weaver.bcel.BcelAdvice munger, UnresolvedType t) Causes the aspect instance to be *set* for later retrievable through localAspectof()/aspectOf() -
weaveCflowEntry
-
weaveAroundInline
public void weaveAroundInline(org.aspectj.weaver.bcel.BcelAdvice munger, boolean hasDynamicTest) -
weaveAroundClosure
public void weaveAroundClosure(org.aspectj.weaver.bcel.BcelAdvice munger, boolean hasDynamicTest) -
genTempVar
-
genTempVar
-
getFactory
-
getSourceLocation
- Angegeben von:
getSourceLocationin KlasseShadow
-
getEnclosingShadow
-
getEnclosingMethod
-
isFallsThrough
public boolean isFallsThrough() -
setActualTargetType
-
getActualTargetType
-