public class WildcardType extends Type
| Modifier and Type | Field and Description |
|---|---|
private Type |
bound |
private int |
hash |
private boolean |
isExtends |
private static Type |
OBJECT |
EMPTY_ARRAY| Constructor and Description |
|---|
WildcardType(Type bound,
boolean isExtends) |
WildcardType(Type bound,
boolean isExtends,
AnnotationInstance[] annotations) |
| Modifier and Type | Method and Description |
|---|---|
WildcardType |
asWildcardType()
Casts this type to a
WildcardType and returns it if the kind is
Type.Kind.WILDCARD_TYPE
Throws an exception otherwise. |
(package private) Type |
bound() |
(package private) Type |
copyType(AnnotationInstance[] newAnnotations) |
(package private) Type |
copyType(Type bound) |
boolean |
equals(java.lang.Object o)
Compares this Type with another type, and returns true if they are equivalent.
|
Type |
extendsBound()
Returns the extends (upper) bound of this wildcard.
|
int |
hashCode()
Computes a hash code representing this type.
|
(package private) boolean |
isExtends() |
Type.Kind |
kind()
Returns the kind of Type this is.
|
Type |
superBound()
Returns the super (lower) bound of this wildcard.
|
java.lang.String |
toString()
Returns a string representation for this type.
|
addAnnotation, annotationArray, annotations, appendAnnotations, asArrayType, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asUnresolvedTypeVariable, asVoidType, create, name, toStringprivate static Type OBJECT
private final boolean isExtends
private final Type bound
private int hash
WildcardType(Type bound, boolean isExtends)
WildcardType(Type bound, boolean isExtends, AnnotationInstance[] annotations)
public Type extendsBound()
public Type superBound()
Type bound()
boolean isExtends()
public WildcardType asWildcardType()
TypeWildcardType and returns it if the kind is
Type.Kind.WILDCARD_TYPE
Throws an exception otherwise.asWildcardType in class TypeClassTypepublic java.lang.String toString()
TypeType copyType(AnnotationInstance[] newAnnotations)
public boolean equals(java.lang.Object o)
Type