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 . |
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 name)
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 TypeKind BOOLEAN
boolean
.public static final TypeKind BYTE
byte
.public static final TypeKind SHORT
short
.public static final TypeKind INT
int
.public static final TypeKind LONG
long
.public static final TypeKind CHAR
char
.public static final TypeKind FLOAT
float
.public static final TypeKind DOUBLE
double
.public static final TypeKind VOID
void
.NoType
public static final TypeKind NONE
NoType
public static final TypeKind NULL
public static final TypeKind ARRAY
public static final TypeKind DECLARED
public static final TypeKind ERROR
public static final TypeKind TYPEVAR
public static final TypeKind WILDCARD
public static final TypeKind PACKAGE
NoType
public static final TypeKind EXECUTABLE
public static final TypeKind OTHER
public static final TypeKind UNION
public static TypeKind[] values()
for (TypeKind c : TypeKind.values()) System.out.println(c);
public static TypeKind valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isPrimitive()
true
if this kind corresponds to a primitive
type and false
otherwise.true
if this kind corresponds to a primitive type Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.