public interface WildcardType extends Type
? extends Number
: has an upper bound? super Number
: has a lower bound?
: unbounded, has an implicit upper bound of java.lang.Object
?
is equivalent to ? extends Object
and is represented as such.
Therefore, either upperBound()
or lowerBound()
always returns non-null
.Modifier and Type | Method and Description |
---|---|
default WildcardType |
asWildcardType()
Returns this type as a wildcard type.
|
default Type.Kind |
kind()
Returns the kind of this type.
|
Type |
lowerBound()
Returns the lower bound of this wildcard type.
|
Type |
upperBound()
Returns the upper bound of this wildcard type.
|
asArray, asClass, asDeclaration, asParameterizedType, asPrimitive, asType, asTypeVariable, asVoid, isArray, isClass, isDeclaration, isParameterizedType, isPrimitive, isType, isTypeVariable, isVoid, isWildcardType
annotation, annotations, annotations, hasAnnotation, hasAnnotation, repeatableAnnotation
Type upperBound()
null
if this wildcard type does not have an upper bound.null
if this wildcard type does not have an upper boundType lowerBound()
null
if this wildcard type does not have a lower bound.null
if this wildcard type does not have a lower bounddefault Type.Kind kind()
Type
default WildcardType asWildcardType()
Type
asWildcardType
in interface Type
null