Enum Class Type.Kind
- All Implemented Interfaces:
Serializable
,Comparable<Type.Kind>
,Constable
- Enclosing interface:
Type
The type kind: void, primitive, class, array, parameterized type, type variable, wildcard type
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAn array type, e.g.A class type, e.g.A parameterized type, e.g.A primitive type, e.g.A type variable, e.g.The void pseudo-type, e.g.A wildcard type, e.g. -
Method Summary
-
Enum Constant Details
-
VOID
The void pseudo-type, e.g. when method returnsvoid
. -
PRIMITIVE
A primitive type, e.g. when method returnsint
. -
CLASS
A class type, e.g. when method returnsString
. -
ARRAY
An array type, e.g. when method returnsint[]
orString[][]
. -
PARAMETERIZED_TYPE
A parameterized type, e.g. when method returnsList<String>
. -
TYPE_VARIABLE
A type variable, e.g. when method returnsT
andT
is a type parameter of the declaring class. -
WILDCARD_TYPE
A wildcard type, e.g. when method returnsList<? extends Number>
. The kind of such type isPARAMETERIZED_TYPE
, but the first (and only) type argument is aWILDCARD_TYPE
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-