Package org.aspectj.weaver
Class Advice
java.lang.Object
org.aspectj.weaver.ShadowMunger
org.aspectj.weaver.Advice
- All Implemented Interfaces:
PartialOrder.PartialComparable,IHasPosition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AjAttribute.AdviceAttributeprotected UnresolvedType[]protected ResolvedTypestatic intstatic intprotected TypePatternstatic intprotected booleanprotected List<ShadowMunger>protected AdviceKindprotected intstatic intprotected Memberstatic intstatic intstatic intstatic intFields inherited from class org.aspectj.weaver.ShadowMunger
end, handle, NONE, pointcut, ShadowMungerAdvice, ShadowMungerDeow, sourceContext, start -
Constructor Summary
ConstructorsConstructorDescriptionAdvice(AjAttribute.AdviceAttribute attribute, Pointcut pointcut, Member signature) -
Method Summary
Modifier and TypeMethodDescriptionconcretize(ResolvedType fromType, World world, PerClause clause)static intcountOnes(int bits)booleanprotected StringintString[]getBaseParameterNames(World world)protected intprotected intReturn the type of the 'extra argument'.getKind()protected Memberabstract booleanbooleaninthashCode()booleanbooleanbooleanstatic AdvicemakeCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, int nFreeVars, List<ShadowMunger> innerCflowEntries, ResolvedType inAspect)static AdvicemakePerCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, ResolvedType inAspect, List<ShadowMunger> innerCflowEntries)static AdvicemakePerObjectEntry(World world, Pointcut entry, boolean isThis, ResolvedType inAspect)static AdvicemakePerTypeWithinEntry(World world, Pointcut p, ResolvedType inAspect)static AdvicemakeSoftener(World world, Pointcut entry, TypePattern exceptionType, ResolvedType inAspect, IHasSourceLocation loc)booleanAll overriding methods should call supervoidsetBindingParameterTypes(UnresolvedType[] types)voidsetHasMatchedSomething(boolean hasMatchedSomething)voidsetLexicalPosition(int lexicalPosition)toString()Methods inherited from class org.aspectj.weaver.ShadowMunger
bindsProceedingJoinPoint, fallbackCompareTo, getBinarySourceLocation, getDeclaringType, getEnd, getSourceLocation, getStart, getThrownExceptions, implementOn, isBinary, mustCheckExceptions, parameterizeWith, setDeclaringType, setPointcut, specializeOn, writeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aspectj.util.PartialOrder.PartialComparable
compareTo
-
Field Details
-
attribute
-
kind
-
signature
-
concreteAspect
-
innerCflowEntries
-
nFreeVars
protected int nFreeVars -
exceptionType
-
bindingParameterTypes
-
hasMatchedAtLeastOnce
protected boolean hasMatchedAtLeastOnce -
suppressedLintKinds
-
lastReportedMonitorExitJoinpointLocation
-
ExtraArgument
public static final int ExtraArgument- See Also:
- Constant Field Values
-
ThisJoinPoint
public static final int ThisJoinPoint- See Also:
- Constant Field Values
-
ThisJoinPointStaticPart
public static final int ThisJoinPointStaticPart- See Also:
- Constant Field Values
-
ThisEnclosingJoinPointStaticPart
public static final int ThisEnclosingJoinPointStaticPart- See Also:
- Constant Field Values
-
ParameterMask
public static final int ParameterMask- See Also:
- Constant Field Values
-
ConstantReference
public static final int ConstantReference- See Also:
- Constant Field Values
-
ConstantValue
public static final int ConstantValue- See Also:
- Constant Field Values
-
ThisAspectInstance
public static final int ThisAspectInstance- See Also:
- Constant Field Values
-
-
Constructor Details
-
Advice
-
-
Method Details
-
makeCflowEntry
public static Advice makeCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, int nFreeVars, List<ShadowMunger> innerCflowEntries, ResolvedType inAspect) -
makePerCflowEntry
public static Advice makePerCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, ResolvedType inAspect, List<ShadowMunger> innerCflowEntries) -
makePerObjectEntry
public static Advice makePerObjectEntry(World world, Pointcut entry, boolean isThis, ResolvedType inAspect) -
makePerTypeWithinEntry
-
isAroundAdvice
public boolean isAroundAdvice()- Overrides:
isAroundAdvicein classShadowMunger
-
makeSoftener
public static Advice makeSoftener(World world, Pointcut entry, TypePattern exceptionType, ResolvedType inAspect, IHasSourceLocation loc) -
match
Description copied from class:ShadowMungerAll overriding methods should call super- Overrides:
matchin classShadowMunger
-
getKind
-
getSignature
-
hasExtraParameter
public boolean hasExtraParameter() -
getExtraParameterFlags
protected int getExtraParameterFlags() -
getExtraParameterCount
protected int getExtraParameterCount() -
getBindingParameterTypes
-
setBindingParameterTypes
-
countOnes
public static int countOnes(int bits) -
getBaseParameterCount
public int getBaseParameterCount() -
getBaseParameterNames
-
getExtraParameterType
Return the type of the 'extra argument'. For either after returning or after throwing advice, the extra argument will be the returned value or the thrown exception respectively. With annotation style the user may declare the parameters in any order, whereas for code style they are in a well defined order. So there is some extra complexity in here for annotation style that looks up the correct parameter in the advice signature by name, based on the name specified in the annotation. If this fails then we 'fallback' to guessing at positions, where the extra argument is presumed to come at the end.- Returns:
- the type of the extraParameter
-
getDeclaringAspect
-
getOriginalSignature
-
extraParametersToString
-
getPointcut
- Overrides:
getPointcutin classShadowMunger
-
concretize
- Specified by:
concretizein classShadowMunger- Parameters:
fromType- is guaranteed to be a non-abstract aspectclause- has been concretized at a higher level
-
toString
-
equals
-
hashCode
public int hashCode() -
setLexicalPosition
public void setLexicalPosition(int lexicalPosition) -
isAnnotationStyle
public boolean isAnnotationStyle() -
getConcreteAspect
- Specified by:
getConcreteAspectin classShadowMunger
-
hasMatchedSomething
public boolean hasMatchedSomething() -
setHasMatchedSomething
public void setHasMatchedSomething(boolean hasMatchedSomething) -
hasDynamicTests
public abstract boolean hasDynamicTests()
-