Package org.aspectj.weaver.patterns
Class TypePattern
- java.lang.Object
-
- org.aspectj.weaver.patterns.PatternNode
-
- org.aspectj.weaver.patterns.TypePattern
-
- All Implemented Interfaces:
IHasPosition,IHasSourceLocation
- Direct Known Subclasses:
AndTypePattern,AnyTypePattern,AnyWithAnnotationTypePattern,EllipsisTypePattern,ExactTypePattern,HasMemberTypePattern,NotTypePattern,NoTypePattern,OrTypePattern,TypeCategoryTypePattern,WildTypePattern
public abstract class TypePattern extends PatternNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypePattern.MatchKind
-
Field Summary
Fields Modifier and Type Field Description static byteANDprotected AnnotationTypePatternannotationPatternstatic TypePatternANYstatic byteANY_KEYstatic byteANY_WITH_ANNOstatic byteBINDINGstatic TypePattern.MatchKindDYNAMICstatic TypePatternELLIPSISstatic byteELLIPSIS_KEYstatic byteEXACTstatic byteHAS_MEMBERprotected booleanincludeSubtypesprotected booleanisVarArgsstatic TypePatternNOstatic byteNO_KEYstatic byteNOTstatic byteORstatic TypePattern.MatchKindSTATICstatic byteTYPE_CATEGORYprotected TypePatternListtypeParametersstatic byteWILD-
Fields inherited from class org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTypePattern(boolean includeSubtypes)protectedTypePattern(boolean includeSubtypes, boolean isVarArgs)protectedTypePattern(boolean includeSubtypes, boolean isVarArgs, TypePatternList typeParams)
-
Method Summary
-
Methods inherited from class org.aspectj.weaver.patterns.PatternNode
accept, copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, write, writeLocation
-
-
-
-
Field Detail
-
STATIC
public static final TypePattern.MatchKind STATIC
-
DYNAMIC
public static final TypePattern.MatchKind DYNAMIC
-
ELLIPSIS
public static final TypePattern ELLIPSIS
-
ANY
public static final TypePattern ANY
-
NO
public static final TypePattern NO
-
includeSubtypes
protected boolean includeSubtypes
-
isVarArgs
protected boolean isVarArgs
-
annotationPattern
protected AnnotationTypePattern annotationPattern
-
typeParameters
protected TypePatternList typeParameters
-
WILD
public static final byte WILD
- See Also:
- Constant Field Values
-
EXACT
public static final byte EXACT
- See Also:
- Constant Field Values
-
BINDING
public static final byte BINDING
- See Also:
- Constant Field Values
-
ELLIPSIS_KEY
public static final byte ELLIPSIS_KEY
- See Also:
- Constant Field Values
-
ANY_KEY
public static final byte ANY_KEY
- See Also:
- Constant Field Values
-
NOT
public static final byte NOT
- See Also:
- Constant Field Values
-
OR
public static final byte OR
- See Also:
- Constant Field Values
-
AND
public static final byte AND
- See Also:
- Constant Field Values
-
NO_KEY
public static final byte NO_KEY
- See Also:
- Constant Field Values
-
ANY_WITH_ANNO
public static final byte ANY_WITH_ANNO
- See Also:
- Constant Field Values
-
HAS_MEMBER
public static final byte HAS_MEMBER
- See Also:
- Constant Field Values
-
TYPE_CATEGORY
public static final byte TYPE_CATEGORY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TypePattern
protected TypePattern(boolean includeSubtypes, boolean isVarArgs, TypePatternList typeParams)
-
TypePattern
protected TypePattern(boolean includeSubtypes, boolean isVarArgs)
-
TypePattern
protected TypePattern(boolean includeSubtypes)
-
-
Method Detail
-
getAnnotationPattern
public AnnotationTypePattern getAnnotationPattern()
-
isVarArgs
public boolean isVarArgs()
-
isStarAnnotation
public boolean isStarAnnotation()
-
isArray
public boolean isArray()
-
setAnnotationTypePattern
public void setAnnotationTypePattern(AnnotationTypePattern annPatt)
-
setTypeParameters
public void setTypeParameters(TypePatternList typeParams)
-
getTypeParameters
public TypePatternList getTypeParameters()
-
setIsVarArgs
public void setIsVarArgs(boolean isVarArgs)
-
couldEverMatchSameTypesAs
protected boolean couldEverMatchSameTypesAs(TypePattern other)
-
matchesStatically
public boolean matchesStatically(ResolvedType type)
-
matchesInstanceof
public abstract FuzzyBoolean matchesInstanceof(ResolvedType type)
-
matches
public final FuzzyBoolean matches(ResolvedType type, TypePattern.MatchKind kind)
-
matchesExactly
protected abstract boolean matchesExactly(ResolvedType type)
-
matchesExactly
protected abstract boolean matchesExactly(ResolvedType type, ResolvedType annotatedType)
-
matchesSubtypes
protected boolean matchesSubtypes(ResolvedType type)
-
matchesSubtypes
protected boolean matchesSubtypes(ResolvedType superType, ResolvedType annotatedType)
-
resolveExactType
public UnresolvedType resolveExactType(IScope scope, Bindings bindings)
-
getExactType
public UnresolvedType getExactType()
-
notExactType
protected TypePattern notExactType(IScope s)
-
resolveBindings
public TypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType)
-
resolve
public void resolve(World world)
-
parameterizeWith
public abstract TypePattern parameterizeWith(Map<String,UnresolvedType> typeVariableMap, World w)
-
postRead
public void postRead(ResolvedType enclosingType)
-
isEllipsis
public boolean isEllipsis()
-
isStar
public boolean isStar()
-
remapAdviceFormals
public TypePattern remapAdviceFormals(IntMap bindings)
-
read
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException
- Throws:
IOException
-
isIncludeSubtypes
public boolean isIncludeSubtypes()
-
isBangVoid
public boolean isBangVoid()
-
isVoid
public boolean isVoid()
-
hasFailedResolution
public boolean hasFailedResolution()
-
-