Package org.aspectj.weaver.patterns
Class AnnotationPointcut
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.Pointcut
org.aspectj.weaver.patterns.NameBindingPointcut
org.aspectj.weaver.patterns.AnnotationPointcut
- All Implemented Interfaces:
IHasPosition,IHasSourceLocation
(at)Annotation((at)Foo) or (at)Annotation(foo)
Matches any join point where the subject of the join point has an annotation matching the annotationTypePattern:
Join Point Kind - Subject
================================
method call - the target method
method execution - the method
constructor call - the constructor
constructor execution - the constructor
get - the target field
set - the target field
adviceexecution - the advice
initialization - the constructor
preinitialization - the constructor
staticinitialization - the type being initialized
handler - the declared type of the handled exception
-
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, WITHINCODEFields inherited from class org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(PatternNodeVisitor visitor, Object data) voidprotected Pointcutconcretize1(ResolvedType inAspect, ResolvedType declaringType, IntMap bindings) Resolves and removes ReferencePointcuts, replacing with basic onesintThe set of ShadowKinds that this Pointcut could possibly match - an int whose bits are set according to the Kinds specified in Shadow.javabooleanfastMatch(FastMatchInfo info) Could I match any shadows in the code defined within this type?protected TestfindResidueInternal(Shadow shadow, ExposedState state) inthashCode()protected FuzzyBooleanmatchInternal(Shadow shadow) parameterizeWith(Map<String, UnresolvedType> typeVariableMap, World w) static Pointcutread(VersionedDataInputStream s, ISourceContext context) protected voidresolveBindings(IScope scope, Bindings bindings) toString()voidMethods inherited from class org.aspectj.weaver.patterns.NameBindingPointcut
exposeStateForVarMethods inherited from class org.aspectj.weaver.patterns.Pointcut
assertState, check, concretize, concretize, concretize, findResidue, fromString, getPointcutKind, getTypeVariablesInScope, isDeclare, makeMatchesNothing, match, postRead, resolve, setTypeVariablesInScope, shouldCopyLocationForConcretizeMethods inherited from class org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
-
Constructor Details
-
AnnotationPointcut
-
AnnotationPointcut
-
-
Method Details
-
getAnnotationTypePattern
-
couldMatchKinds
public int couldMatchKinds()Description copied from class:PointcutThe 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:
couldMatchKindsin classPointcut
-
parameterizeWith
- Specified by:
parameterizeWithin classPointcut
-
fastMatch
Description copied from class:PointcutCould I match any shadows in the code defined within this type? -
matchInternal
- Specified by:
matchInternalin classPointcut
-
resolveBindings
- Specified by:
resolveBindingsin classPointcut
-
concretize1
Description copied from class:PointcutResolves and removes ReferencePointcuts, replacing with basic ones- Specified by:
concretize1in 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
- Specified by:
findResidueInternalin classPointcut
-
getBindingAnnotationTypePatterns
- Specified by:
getBindingAnnotationTypePatternsin classNameBindingPointcut
-
getBindingTypePatterns
- Specified by:
getBindingTypePatternsin classNameBindingPointcut
-
write
- Specified by:
writein classPatternNode- Throws:
IOException
-
read
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
buildDeclarationText
public void buildDeclarationText() -
toString
-
accept
- Specified by:
acceptin classPatternNode
-