Interface WildcardType
- All Superinterfaces:
AnnotationTarget
,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, either upperBound()
or lowerBound()
always returns non-null
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault WildcardType
Returns this type as a wildcard type.default Type.Kind
kind()
Returns the kind of this type.Returns the lower bound of this wildcard type.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 Details
-
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
Description copied from interface:Type
Returns the kind of this type. -
asWildcardType
Description copied from interface:Type
Returns this type as a wildcard type.- Specified by:
asWildcardType
in interfaceType
- Returns:
- this wildcard type, never
null
-