public class ExactTypePattern extends TypePattern
TypePattern.MatchKind| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.Class<?>> |
boxedPrimitivesMap |
boolean |
checked |
boolean |
isVoid |
static java.util.Map<java.lang.String,java.lang.Class<?>> |
primitiveTypesMap |
protected ResolvedType |
resolvedType |
protected UnresolvedType |
type |
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, WILDend, sourceContext, start| Constructor and Description |
|---|
ExactTypePattern(UnresolvedType type,
boolean includeSubtypes,
boolean isVarArgs) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
accept(PatternNodeVisitor visitor,
java.lang.Object data) |
protected boolean |
couldEverMatchSameTypesAs(TypePattern other) |
boolean |
equals(java.lang.Object other) |
ResolvedType |
getResolvedExactType(World world) |
UnresolvedType |
getType() |
int |
hashCode() |
boolean |
isArray() |
boolean |
isVoid()
for quickly recognizing the pattern 'void'
|
protected boolean |
matchesExactly(ResolvedType matchType) |
protected boolean |
matchesExactly(ResolvedType matchType,
ResolvedType annotatedType) |
FuzzyBoolean |
matchesInstanceof(ResolvedType matchType) |
protected boolean |
matchesSubtypes(ResolvedType type) |
TypePattern |
parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> typeVariableMap,
World w)
return a version of this type pattern with all type variables references replaced by the corresponding entry in the map.
|
static TypePattern |
read(VersionedDataInputStream s,
ISourceContext context) |
static TypePattern |
readTypePattern150(VersionedDataInputStream s,
ISourceContext context) |
static TypePattern |
readTypePatternOldStyle(java.io.DataInputStream s,
ISourceContext context) |
TypePattern |
resolveBindings(IScope scope,
Bindings bindings,
boolean allowBinding,
boolean requireExactType)
This can modify in place, or return a new TypePattern if the type changes.
|
java.lang.String |
toString() |
void |
write(CompressingDataOutputStream out) |
getAnnotationPattern, getExactType, getTypeParameters, hasFailedResolution, isBangVoid, isEllipsis, isIncludeSubtypes, isStar, isStarAnnotation, isVarArgs, matches, matchesStatically, matchesSubtypes, notExactType, postRead, remapAdviceFormals, resolve, resolveExactType, setAnnotationTypePattern, setIsVarArgs, setTypeParameterscopyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocationprotected UnresolvedType type
protected transient ResolvedType resolvedType
public boolean checked
public boolean isVoid
public static final java.util.Map<java.lang.String,java.lang.Class<?>> primitiveTypesMap
public static final java.util.Map<java.lang.String,java.lang.Class<?>> boxedPrimitivesMap
public ExactTypePattern(UnresolvedType type, boolean includeSubtypes, boolean isVarArgs)
protected boolean matchesSubtypes(ResolvedType type)
matchesSubtypes in class TypePatternpublic boolean isArray()
isArray in class TypePatternprotected boolean couldEverMatchSameTypesAs(TypePattern other)
couldEverMatchSameTypesAs in class TypePatternprotected boolean matchesExactly(ResolvedType matchType)
matchesExactly in class TypePatternprotected boolean matchesExactly(ResolvedType matchType, ResolvedType annotatedType)
matchesExactly in class TypePatternpublic UnresolvedType getType()
public ResolvedType getResolvedExactType(World world)
public boolean isVoid()
TypePatternisVoid in class TypePatternpublic FuzzyBoolean matchesInstanceof(ResolvedType matchType)
matchesInstanceof in class TypePatternpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void write(CompressingDataOutputStream out) throws java.io.IOException
write in class PatternNodejava.io.IOExceptionpublic static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOExceptionpublic static TypePattern readTypePattern150(VersionedDataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOExceptionpublic static TypePattern readTypePatternOldStyle(java.io.DataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic TypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType)
TypePatternresolveBindings in class TypePatternpublic TypePattern parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> typeVariableMap, World w)
parameterizeWith in class TypePatternpublic java.lang.Object accept(PatternNodeVisitor visitor, java.lang.Object data)
accept in class PatternNode