Package org.aspectj.weaver.patterns
Class ThisOrTargetAnnotationPointcut
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.Pointcut
org.aspectj.weaver.patterns.NameBindingPointcut
org.aspectj.weaver.patterns.ThisOrTargetAnnotationPointcut
- All Implemented Interfaces:
IHasPosition
,IHasSourceLocation
- Author:
- colyer TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
-
Nested Class Summary
Nested classes/interfaces inherited from class org.aspectj.weaver.patterns.Pointcut
Pointcut.State
-
Field Summary
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
ConstructorDescriptionThisOrTargetAnnotationPointcut(boolean isThis, ExactAnnotationTypePattern type)
ThisOrTargetAnnotationPointcut(boolean isThis, ExactAnnotationTypePattern type, ShadowMunger munger)
-
Method Summary
Modifier and TypeMethodDescriptionaccept(PatternNodeVisitor visitor, Object data)
protected Pointcut
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 info)
Could I match any shadows in the code defined within this type?protected Test
findResidueInternal(Shadow shadow, ExposedState state)
The guard here is going to be the hasAnnotation() test - if it gets through (which we cannot determine until runtime) then we must have a TypeAnnotationAccessVar in place - this means we must *always* have one in place.int
hashCode()
boolean
isThis()
protected FuzzyBoolean
matchInternal(Shadow shadow)
parameterizeWith(Map<String,UnresolvedType> typeVariableMap, World w)
static Pointcut
read(VersionedDataInputStream s, ISourceContext context)
protected void
resolveBindings(IScope scope, Bindings bindings)
toString()
void
Methods inherited from class org.aspectj.weaver.patterns.NameBindingPointcut
exposeStateForVar
Methods inherited from class org.aspectj.weaver.patterns.Pointcut
assertState, check, concretize, concretize, concretize, findResidue, fromString, getPointcutKind, getTypeVariablesInScope, isDeclare, makeMatchesNothing, match, postRead, resolve, setTypeVariablesInScope, shouldCopyLocationForConcretize
Methods inherited from class org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
-
Constructor Details
-
ThisOrTargetAnnotationPointcut
-
ThisOrTargetAnnotationPointcut
public ThisOrTargetAnnotationPointcut(boolean isThis, ExactAnnotationTypePattern type, ShadowMunger munger)
-
-
Method Details
-
getAnnotationTypePattern
-
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
-
parameterizeWith
- Specified by:
parameterizeWith
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
-
isThis
public boolean isThis() -
resolveBindings
- Specified by:
resolveBindings
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
-
findResidueInternal
The guard here is going to be the hasAnnotation() test - if it gets through (which we cannot determine until runtime) then we must have a TypeAnnotationAccessVar in place - this means we must *always* have one in place.- Specified by:
findResidueInternal
in classPointcut
-
getBindingAnnotationTypePatterns
- Specified by:
getBindingAnnotationTypePatterns
in classNameBindingPointcut
-
getBindingTypePatterns
- Specified by:
getBindingTypePatterns
in classNameBindingPointcut
-
write
- Specified by:
write
in classPatternNode
- Throws:
IOException
-
read
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
accept
- Specified by:
accept
in classPatternNode
-