public class IfPointcut extends Pointcut
Modifier and Type | Class and Description |
---|---|
static class |
IfPointcut.IfFalsePointcut |
static class |
IfPointcut.IfTruePointcut |
Pointcut.State
Modifier and Type | Field and Description |
---|---|
int |
extraParameterFlags |
Pointcut |
residueSource |
ResolvedMember |
testMethod |
AND, ANNOTATION, ARGS, ATARGS, ATTHIS_OR_TARGET, ATWITHIN, ATWITHINCODE, CFLOW, CONCRETE, EMPTY_STRING_ARRAY, HANDLER, hasBeenParameterized, IF, IF_FALSE, IF_TRUE, KINDED, lastMatchedShadowId, m_ignoreUnboundBindingForNames, NONE, NOT, OR, pointcutKind, REFERENCE, RESOLVED, state, SYMBOLIC, THIS_OR_TARGET, USER_EXTENSION, WITHIN, WITHINCODE
end, sourceContext, start
Constructor and Description |
---|
IfPointcut(ResolvedMember testMethod,
int extraParameterFlags) |
IfPointcut(java.lang.String enclosingPointcutHint)
No-arg constructor for @AJ style, where the if() body is actually the @Pointcut annotated method
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(PatternNodeVisitor visitor,
java.lang.Object data) |
boolean |
alwaysFalse() |
boolean |
alwaysTrue() |
Pointcut |
concretize1(ResolvedType inAspect,
ResolvedType declaringType,
IntMap bindings)
Resolves and removes ReferencePointcuts, replacing with basic ones
|
int |
couldMatchKinds()
The set of ShadowKinds that this Pointcut could possibly match - an int whose bits are set according to the Kinds specified
in Shadow.java
|
boolean |
equals(java.lang.Object other) |
FuzzyBoolean |
fastMatch(FastMatchInfo type)
Could I match any shadows in the code defined within this type?
|
protected Test |
findResidueInternal(Shadow shadow,
ExposedState state)
At each shadow that matched, the residue can be different.
|
Pointcut |
getResidueSource() |
int |
hashCode() |
static IfPointcut |
makeIfFalsePointcut(Pointcut.State state) |
static IfPointcut |
makeIfTruePointcut(Pointcut.State state) |
protected FuzzyBoolean |
matchInternal(Shadow shadow) |
Pointcut |
parameterizeWith(java.util.Map typeVariableMap,
World w) |
static Pointcut |
read(VersionedDataInputStream s,
ISourceContext context) |
void |
resolveBindings(IScope scope,
Bindings bindings) |
void |
setAlways(boolean matches)
Called when it is determined that the pointcut refers to a constant value of TRUE or FALSE - enabling exact matching and no
unnecessary calls to the method representing the if body.
|
protected boolean |
shouldCopyLocationForConcretize() |
java.lang.String |
toString() |
void |
write(CompressingDataOutputStream s) |
assertState, check, concretize, concretize, concretize, findResidue, fromString, getPointcutKind, getTypeVariablesInScope, isDeclare, makeMatchesNothing, match, postRead, resolve, setTypeVariablesInScope
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
public ResolvedMember testMethod
public int extraParameterFlags
public Pointcut residueSource
public IfPointcut(ResolvedMember testMethod, int extraParameterFlags)
public IfPointcut(java.lang.String enclosingPointcutHint)
public int couldMatchKinds()
Pointcut
couldMatchKinds
in class Pointcut
public FuzzyBoolean fastMatch(FastMatchInfo type)
Pointcut
protected FuzzyBoolean matchInternal(Shadow shadow)
matchInternal
in class Pointcut
public boolean alwaysFalse()
public boolean alwaysTrue()
public Pointcut getResidueSource()
public void write(CompressingDataOutputStream s) throws java.io.IOException
write
in class PatternNode
java.io.IOException
public static Pointcut read(VersionedDataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOException
public void resolveBindings(IScope scope, Bindings bindings)
resolveBindings
in class Pointcut
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected Test findResidueInternal(Shadow shadow, ExposedState state)
findResidueInternal
in class Pointcut
protected boolean shouldCopyLocationForConcretize()
shouldCopyLocationForConcretize
in class Pointcut
public Pointcut concretize1(ResolvedType inAspect, ResolvedType declaringType, IntMap bindings)
Pointcut
concretize1
in class Pointcut
inAspect
- the aspect to resolve relative tobindings
- a Map from formal index in the current lexical context -> formal index in the concrete advice that will run
This must always return a new Pointcut object (even if the concretized Pointcut is identical to the resolved one).
That behavior is assumed in many places. XXX fix implementors to handle statepublic Pointcut parameterizeWith(java.util.Map typeVariableMap, World w)
parameterizeWith
in class Pointcut
public static IfPointcut makeIfFalsePointcut(Pointcut.State state)
public java.lang.Object accept(PatternNodeVisitor visitor, java.lang.Object data)
accept
in class PatternNode
public static IfPointcut makeIfTruePointcut(Pointcut.State state)
public void setAlways(boolean matches)