Module jakarta.cdi.lang.model
Interface ParameterizedType
-
- All Superinterfaces:
AnnotationTarget
,Type
public interface ParameterizedType extends Type
A parameterized type. That is, a generic class together with a list of type arguments. The list of type arguments has the same shape as the class's list of type parameters.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ParameterizedType
asParameterizedType()
Returns this type as a parameterized type.default ClassInfo
declaration()
Returns the declaration of the generic class that was parameterized with a list of type arguments to form this parameterized type.ClassType
genericClass()
Returns the type of the generic class that was parameterized with a list of type arguments to form this parameterized type.default Type.Kind
kind()
Returns the kind of this type.java.util.List<Type>
typeArguments()
Returns the list of type arguments that were applied to a generic class to form this parameterized 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, asPrimitive, asType, asTypeVariable, asVoid, asWildcardType, isArray, isClass, isDeclaration, isParameterizedType, isPrimitive, isType, isTypeVariable, isVoid, isWildcardType
-
-
-
-
Method Detail
-
genericClass
ClassType genericClass()
Returns the type of the generic class that was parameterized with a list of type arguments to form this parameterized type.- Returns:
- the type of the generic class, never
null
-
typeArguments
java.util.List<Type> typeArguments()
Returns the list of type arguments that were applied to a generic class to form this parameterized type.- Returns:
- immutable list of type arguments, never
null
or empty
-
declaration
default ClassInfo declaration()
Returns the declaration of the generic class that was parameterized with a list of type arguments to form this parameterized type.- Returns:
- the declaration of the generic class, never
null
-
kind
default Type.Kind kind()
Description copied from interface:Type
Returns the kind of this type.
-
asParameterizedType
default ParameterizedType asParameterizedType()
Description copied from interface:Type
Returns this type as a parameterized type.- Specified by:
asParameterizedType
in interfaceType
- Returns:
- this parameterized type, never
null
-
-