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
Modifier and TypeFieldDescriptionprotected AjAttribute.AdviceAttribute
protected UnresolvedType[]
protected ResolvedType
static int
static int
protected TypePattern
static int
protected boolean
protected List<ShadowMunger>
protected AdviceKind
protected int
static int
protected Member
static int
static int
static int
static int
Fields inherited from class org.aspectj.weaver.ShadowMunger
end, handle, NONE, pointcut, ShadowMungerAdvice, ShadowMungerDeow, sourceContext, start
-
Constructor Summary
ConstructorDescriptionAdvice(AjAttribute.AdviceAttribute attribute, Pointcut pointcut, Member signature)
-
Method Summary
Modifier and TypeMethodDescriptionconcretize(ResolvedType fromType, World world, PerClause clause)
static int
countOnes(int bits)
boolean
protected String
int
String[]
getBaseParameterNames(World world)
protected int
protected int
Return the type of the 'extra argument'.getKind()
protected Member
abstract boolean
boolean
int
hashCode()
boolean
boolean
boolean
static Advice
makeCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, int nFreeVars, List<ShadowMunger> innerCflowEntries, ResolvedType inAspect)
static Advice
makePerCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, ResolvedType inAspect, List<ShadowMunger> innerCflowEntries)
static Advice
makePerObjectEntry(World world, Pointcut entry, boolean isThis, ResolvedType inAspect)
static Advice
makePerTypeWithinEntry(World world, Pointcut p, ResolvedType inAspect)
static Advice
makeSoftener(World world, Pointcut entry, TypePattern exceptionType, ResolvedType inAspect, IHasSourceLocation loc)
boolean
All overriding methods should call supervoid
setBindingParameterTypes(UnresolvedType[] types)
void
setHasMatchedSomething(boolean hasMatchedSomething)
void
setLexicalPosition(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, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
isAroundAdvice
in classShadowMunger
-
makeSoftener
public static Advice makeSoftener(World world, Pointcut entry, TypePattern exceptionType, ResolvedType inAspect, IHasSourceLocation loc) -
match
Description copied from class:ShadowMunger
All overriding methods should call super- Overrides:
match
in 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:
getPointcut
in classShadowMunger
-
concretize
- Specified by:
concretize
in 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:
getConcreteAspect
in classShadowMunger
-
hasMatchedSomething
public boolean hasMatchedSomething() -
setHasMatchedSomething
public void setHasMatchedSomething(boolean hasMatchedSomething) -
hasDynamicTests
public abstract boolean hasDynamicTests()
-