Interface WildcardType
-
- 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 Objectand 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 WildcardTypeasWildcardType()Returns this type as a wildcard type.default Type.Kindkind()Returns the kind of this type.TypelowerBound()Returns the lower bound of this wildcard type.TypeupperBound()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. 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
default Type.Kind kind()
Description copied from interface:TypeReturns the kind of this type.
-
asWildcardType
default WildcardType asWildcardType()
Description copied from interface:TypeReturns this type as a wildcard type.- Specified by:
asWildcardTypein interfaceType- Returns:
- this wildcard type, never
null
-
-