-
- All Superinterfaces:
AnnotationTarget
,Type
public interface WildcardType extends Type
A wildcard type. May have 3 forms:? extends Number
: has an upper bound? super Number
: has a lower bound?
: unbounded, has an implicit upper bound ofjava.lang.Object
?
is equivalent to? extends Object
and is represented as such. Therefore, eitherupperBound()
orlowerBound()
always returns non-null
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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.-
Methods inherited from interface jakarta.enterprise.lang.model.AnnotationTarget
annotation, annotations, annotations, hasAnnotation, hasAnnotation, repeatableAnnotation
-
Methods inherited from interface jakarta.enterprise.lang.model.types.Type
asArray, asClass, asDeclaration, asParameterizedType, asPrimitive, asType, asTypeVariable, asVoid, isArray, isClass, isDeclaration, isParameterizedType, isPrimitive, isType, isTypeVariable, isVoid, isWildcardType
-
-
-
-
Method Detail
-
upperBound
Type upperBound()
Returns the upper bound of this wildcard type. Returnsnull
if this wildcard type does not have an upper bound.- Returns:
- upper bound of this wildcard type, or
null
if this wildcard type does not have an upper bound
-
lowerBound
Type lowerBound()
Returns the lower bound of this wildcard type. Returnsnull
if this wildcard type does not have a lower bound.- Returns:
- lower bound of this wildcard type, or
null
if this wildcard type does not have a lower bound
-
kind
default Type.Kind kind()
Description copied from interface:Type
Returns the kind of this type.
-
asWildcardType
default WildcardType asWildcardType()
Description copied from interface:Type
Returns this type as a wildcard type.- Specified by:
asWildcardType
in interfaceType
- Returns:
- this wildcard type, never
null
-
-