Class IfPointcut
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.Pointcut
org.aspectj.weaver.patterns.IfPointcut
- All Implemented Interfaces:
IHasPosition
,IHasSourceLocation
- Direct Known Subclasses:
IfPointcut.IfFalsePointcut
,IfPointcut.IfTruePointcut
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from class org.aspectj.weaver.patterns.Pointcut
Pointcut.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
Fields inherited from class org.aspectj.weaver.patterns.Pointcut
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
Fields inherited from class org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start
-
Constructor Summary
ConstructorsConstructorDescriptionIfPointcut
(String enclosingPointcutHint) No-arg constructor for @AJ style, where the if() body is actually the @Pointcut annotated methodIfPointcut
(ResolvedMember testMethod, int extraParameterFlags) -
Method Summary
Modifier and TypeMethodDescriptionaccept
(PatternNodeVisitor visitor, Object data) boolean
boolean
concretize1
(ResolvedType inAspect, ResolvedType declaringType, IntMap bindings) Resolves and removes ReferencePointcuts, replacing with basic onesint
The set of ShadowKinds that this Pointcut could possibly match - an int whose bits are set according to the Kinds specified in Shadow.javaboolean
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.int
hashCode()
static IfPointcut
static IfPointcut
makeIfTruePointcut
(Pointcut.State state) protected FuzzyBoolean
matchInternal
(Shadow shadow) parameterizeWith
(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
toString()
traverse
(PatternNodeVisitor visitor, Object data) void
Methods inherited from class org.aspectj.weaver.patterns.Pointcut
assertState, check, concretize, concretize, concretize, findResidue, fromString, getPointcutKind, getTypeVariablesInScope, isDeclare, makeMatchesNothing, match, postRead, resolve, setTypeVariablesInScope
Methods inherited from class org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, writeLocation
-
Field Details
-
testMethod
-
extraParameterFlags
public int extraParameterFlags -
residueSource
-
-
Constructor Details
-
IfPointcut
-
IfPointcut
No-arg constructor for @AJ style, where the if() body is actually the @Pointcut annotated method
-
-
Method Details
-
couldMatchKinds
public int couldMatchKinds()Description copied from class:Pointcut
The set of ShadowKinds that this Pointcut could possibly match - an int whose bits are set according to the Kinds specified in Shadow.java- Specified by:
couldMatchKinds
in classPointcut
-
fastMatch
Description copied from class:Pointcut
Could I match any shadows in the code defined within this type? -
matchInternal
- Specified by:
matchInternal
in classPointcut
-
alwaysFalse
public boolean alwaysFalse() -
alwaysTrue
public boolean alwaysTrue() -
getResidueSource
-
write
- Specified by:
write
in classPatternNode
- Throws:
IOException
-
read
- Throws:
IOException
-
resolveBindings
- Specified by:
resolveBindings
in classPointcut
-
equals
-
hashCode
-
toString
-
findResidueInternal
At each shadow that matched, the residue can be different.- Specified by:
findResidueInternal
in classPointcut
-
shouldCopyLocationForConcretize
protected boolean shouldCopyLocationForConcretize()- Overrides:
shouldCopyLocationForConcretize
in classPointcut
-
concretize1
Description copied from class:Pointcut
Resolves and removes ReferencePointcuts, replacing with basic ones- Specified by:
concretize1
in classPointcut
- Parameters:
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 state
-
parameterizeWith
- Specified by:
parameterizeWith
in classPointcut
-
makeIfFalsePointcut
-
accept
- Specified by:
accept
in classPatternNode
-
traverse
- Overrides:
traverse
in classPatternNode
-
makeIfTruePointcut
-
setAlways
public 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.
-