Class TypeCategoryTypePattern
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.TypePattern
org.aspectj.weaver.patterns.TypeCategoryTypePattern
- All Implemented Interfaces:
IHasPosition, IHasSourceLocation
A TypeCategoryTypePattern matches on the category of a type, one of class/interface/aspect/inner/anonymous/enum/annotation, and
these are specified in the pointcut via isClass() isInterface() isAspect() isInner() isAnonymous() isEnum() isAnnotation().
- Since:
- 1.6.9
- Author:
- Andy Clement
-
Nested Class Summary
Nested classes/interfaces inherited from class TypePattern
TypePattern.MatchKind -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class TypePattern
AND, annotationPattern, ANY, ANY_KEY, ANY_WITH_ANNO, BINDING, DYNAMIC, ELLIPSIS, ELLIPSIS_KEY, EXACT, HAS_MEMBER, includeSubtypes, isVarArgs, NO, NO_KEY, NOT, OR, STATIC, TYPE_CATEGORY, typeParameters, WILDModifier and TypeFieldDescriptionstatic final byteprotected AnnotationTypePatternstatic final TypePatternstatic final bytestatic final bytestatic final bytestatic final TypePattern.MatchKindstatic final TypePatternstatic final bytestatic final bytestatic final byteprotected booleanprotected booleanstatic final TypePatternstatic final bytestatic final bytestatic final bytestatic final TypePattern.MatchKindstatic final byteprotected TypePatternListstatic final byteFields inherited from class PatternNode
end, sourceContext, start -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(PatternNodeVisitor visitor, Object data) booleanintinthashCode()protected booleanmatchesArray(UnresolvedType type) protected booleanmatchesExactly(ResolvedType type) protected booleanmatchesExactly(ResolvedType type, ResolvedType annotatedType) parameterizeWith(Map<String, UnresolvedType> typeVariableMap, World w) return a version of this type pattern in which all type variable references have been replaced by their corresponding entry in the map.static TypePatternread(VersionedDataInputStream s, ISourceContext context) voidMethods inherited from class TypePattern
couldEverMatchSameTypesAs, getAnnotationPattern, getDimensions, getExactType, getTypeParameters, hasFailedResolution, isArray, isBangVoid, isEllipsis, isIncludeSubtypes, isStar, isStarAnnotation, isVarArgs, isVoid, matches, matchesStatically, matchesSubtypes, matchesSubtypes, notExactType, postRead, remapAdviceFormals, resolve, resolveBindings, resolveExactType, setAnnotationTypePattern, setIsVarArgs, setTypeParameters, traverseModifier and TypeMethodDescriptionprotected booleanintbooleanbooleanisArray()booleanFor quickly recognizing the pattern '!void'booleanbooleanbooleanisStar()booleanbooleanbooleanisVoid()for quickly recognizing the pattern 'void'final FuzzyBooleanmatches(ResolvedType type, TypePattern.MatchKind kind) booleanprotected booleanmatchesSubtypes(ResolvedType type) protected booleanmatchesSubtypes(ResolvedType superType, ResolvedType annotatedType) protected TypePatternvoidpostRead(ResolvedType enclosingType) remapAdviceFormals(IntMap bindings) This is called during concretization of pointcuts, it is used by BindingTypePattern to return a new BindingTypePattern with a formal index appropriate for the advice, rather than for the lexical declaration, i.e.voidresolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) This can modify in place, or return a new TypePattern if the type changes.resolveExactType(IScope scope, Bindings bindings) voidvoidsetIsVarArgs(boolean isVarArgs) voidsetTypeParameters(TypePatternList typeParams) traverse(PatternNodeVisitor visitor, Object data) Methods inherited from class PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, writeLocationModifier and TypeMethodDescriptionvoidcopyLocationFrom(PatternNode other) intgetEnd()The ending index of this location in the character stream This points to the last character in this token.intgetStart()The starting index of this location in the character stream.voidreadLocation(ISourceContext context, DataInputStream s) voidsetLocation(ISourceContext sourceContext, int start, int end) void
-
Field Details
-
CLASS
public static final int CLASS- See Also:
-
INTERFACE
public static final int INTERFACE- See Also:
-
ASPECT
public static final int ASPECT- See Also:
-
INNER
public static final int INNER- See Also:
-
ANONYMOUS
public static final int ANONYMOUS- See Also:
-
ENUM
public static final int ENUM- See Also:
-
ANNOTATION
public static final int ANNOTATION- See Also:
-
FINAL
public static final int FINAL- See Also:
-
ABSTRACT
public static final int ABSTRACT- See Also:
-
-
Constructor Details
-
TypeCategoryTypePattern
public TypeCategoryTypePattern(int category)
-
-
Method Details
-
getTypeCategory
public int getTypeCategory() -
matchesExactly
- Specified by:
matchesExactlyin classTypePattern
-
matchesExactly
- Specified by:
matchesExactlyin classTypePattern
-
matchesArray
- Specified by:
matchesArrayin classTypePattern
-
matchesInstanceof
- Specified by:
matchesInstanceofin classTypePattern
-
parameterizeWith
Description copied from class:TypePatternreturn a version of this type pattern in which all type variable references have been replaced by their corresponding entry in the map.- Specified by:
parameterizeWithin classTypePattern
-
accept
- Specified by:
acceptin classPatternNode
-
equals
-
hashCode
-
write
- Specified by:
writein classPatternNode- Throws:
IOException
-
read
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException - Throws:
IOException
-