public enum TypeKind extends Enum<TypeKind >
Note that it is possible additional type kinds will be added to accommodate new, currently unknown, language structures added to future versions of the Java™ programming language.
TypeMirror
| Enum Constant and Description |
|---|
ARRAY
An array type.
|
BOOLEAN
The primitive type
boolean.
|
BYTE
The primitive type
byte.
|
CHAR
The primitive type
char.
|
DECLARED
A class or interface type.
|
DOUBLE
The primitive type
double.
|
ERROR
A class or interface type that could not be resolved.
|
EXECUTABLE
A method, constructor, or initializer.
|
FLOAT
The primitive type
float.
|
INT
The primitive type
int.
|
INTERSECTION
An intersection type.
|
LONG
The primitive type
long.
|
NONE
A pseudo-type used where no actual type is appropriate.
|
NULL
The null type.
|
OTHER
An implementation-reserved type.
|
PACKAGE
A pseudo-type corresponding to a package element.
|
SHORT
The primitive type
short.
|
TYPEVAR
A type variable.
|
UNION
A union type.
|
VOID
The pseudo-type corresponding to the keyword
void.
|
WILDCARD
A wildcard type argument.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPrimitive()
Returns
true if this kind corresponds to a primitive type and
false otherwise.
|
static TypeKind |
valueOf(String
Returns the enum constant of this type with the specified name.
|
static TypeKind |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final TypeKindBOOLEAN
boolean.
public static final TypeKindBYTE
byte.
public static final TypeKindSHORT
short.
public static final TypeKindINT
int.
public static final TypeKindLONG
long.
public static final TypeKindCHAR
char.
public static final TypeKindFLOAT
float.
public static final TypeKindDOUBLE
double.
public static final TypeKindVOID
void.
NoType
public static final TypeKindNONE
NoType
public static final TypeKindNULL
public static final TypeKindARRAY
public static final TypeKindDECLARED
public static final TypeKindERROR
public static final TypeKindTYPEVAR
public static final TypeKindWILDCARD
public static final TypeKindPACKAGE
NoType
public static final TypeKindEXECUTABLE
public static final TypeKindOTHER
public static final TypeKindUNION
public static final TypeKindINTERSECTION
public static TypeKind[] values()
for (TypeKind c : TypeKind.values()) System.out.println(c);
public static TypeKindvalueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null
public boolean isPrimitive()
true if this kind corresponds to a primitive type and
false otherwise.
true if this kind corresponds to a primitive type