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 WildcardTypeReturns this type as a wildcard type.default Type.Kindkind()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, repeatableAnnotationMethods 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. Returnsnullif this wildcard type does not have an upper bound.- Returns:
- upper bound of this wildcard type, or
nullif this wildcard type does not have an upper bound
-
lowerBound
Type lowerBound()Returns the lower bound of this wildcard type. Returnsnullif this wildcard type does not have a lower bound.- Returns:
- lower bound of this wildcard type, or
nullif this wildcard type does not have a lower bound
-
kind
Description copied from interface:TypeReturns the kind of this type. -
asWildcardType
Description copied from interface:TypeReturns this type as a wildcard type.- Specified by:
asWildcardTypein interfaceType- Returns:
- this wildcard type, never
null
-