org.aspectj.weaver.patterns
Class TypeCategoryTypePattern

java.lang.Object
  extended by org.aspectj.weaver.patterns.PatternNode
      extended by org.aspectj.weaver.patterns.TypePattern
          extended by org.aspectj.weaver.patterns.TypeCategoryTypePattern
All Implemented Interfaces:
IHasPosition, IHasSourceLocation

public class TypeCategoryTypePattern
extends TypePattern

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.aspectj.weaver.patterns.TypePattern
TypePattern.MatchKind
 
Field Summary
static int ANNOTATION
           
static int ANONYMOUS
           
static int ASPECT
           
static int CLASS
           
static int ENUM
           
static int INNER
           
static int INTERFACE
           
 
Fields inherited from class org.aspectj.weaver.patterns.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, WILD
 
Fields inherited from class org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start
 
Constructor Summary
TypeCategoryTypePattern(int category)
           
 
Method Summary
 java.lang.Object accept(PatternNodeVisitor visitor, java.lang.Object data)
           
 boolean equals(java.lang.Object other)
           
 int getTypeCategory()
           
 int hashCode()
           
protected  boolean matchesExactly(ResolvedType type)
           
protected  boolean matchesExactly(ResolvedType type, ResolvedType annotatedType)
           
 FuzzyBoolean matchesInstanceof(ResolvedType type)
           
 TypePattern parameterizeWith(java.util.Map 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 TypePattern read(VersionedDataInputStream s, ISourceContext context)
           
 void write(CompressingDataOutputStream s)
           
 
Methods inherited from class org.aspectj.weaver.patterns.TypePattern
couldEverMatchSameTypesAs, getAnnotationPattern, getExactType, getTypeParameters, hasFailedResolution, isArray, isBangVoid, isEllipsis, isIncludeSubtypes, isStar, isStarAnnotation, isVarArgs, isVoid, matches, matchesStatically, matchesSubtypes, matchesSubtypes, notExactType, postRead, remapAdviceFormals, resolve, resolveBindings, resolveExactType, setAnnotationTypePattern, setIsVarArgs, setTypeParameters
 
Methods inherited from class org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS

public static final int CLASS
See Also:
Constant Field Values

INTERFACE

public static final int INTERFACE
See Also:
Constant Field Values

ASPECT

public static final int ASPECT
See Also:
Constant Field Values

INNER

public static final int INNER
See Also:
Constant Field Values

ANONYMOUS

public static final int ANONYMOUS
See Also:
Constant Field Values

ENUM

public static final int ENUM
See Also:
Constant Field Values

ANNOTATION

public static final int ANNOTATION
See Also:
Constant Field Values
Constructor Detail

TypeCategoryTypePattern

public TypeCategoryTypePattern(int category)
Method Detail

getTypeCategory

public int getTypeCategory()

matchesExactly

protected boolean matchesExactly(ResolvedType type)
Specified by:
matchesExactly in class TypePattern

matchesExactly

protected boolean matchesExactly(ResolvedType type,
                                 ResolvedType annotatedType)
Specified by:
matchesExactly in class TypePattern

matchesInstanceof

public FuzzyBoolean matchesInstanceof(ResolvedType type)
Specified by:
matchesInstanceof in class TypePattern

parameterizeWith

public TypePattern parameterizeWith(java.util.Map typeVariableMap,
                                    World w)
Description copied from class: TypePattern
return a version of this type pattern in which all type variable references have been replaced by their corresponding entry in the map.

Specified by:
parameterizeWith in class TypePattern

accept

public java.lang.Object accept(PatternNodeVisitor visitor,
                               java.lang.Object data)
Specified by:
accept in class PatternNode

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

write

public void write(CompressingDataOutputStream s)
           throws java.io.IOException
Specified by:
write in class PatternNode
Throws:
java.io.IOException

read

public static TypePattern read(VersionedDataInputStream s,
                               ISourceContext context)
                        throws java.io.IOException
Throws:
java.io.IOException