public enum TypeKind extends Enum<TypeKind>
The kind of a type mirror.
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
public static final TypeKind BOOLEAN
The primitive type boolean
.
public static final TypeKind BYTE
The primitive type byte
.
public static final TypeKind SHORT
The primitive type short
.
public static final TypeKind INT
The primitive type int
.
public static final TypeKind LONG
The primitive type long
.
public static final TypeKind CHAR
The primitive type char
.
public static final TypeKind FLOAT
The primitive type float
.
public static final TypeKind DOUBLE
The primitive type double
.
public static final TypeKind VOID
The pseudo-type corresponding to the keyword void
.
NoType
public static final TypeKind NONE
A pseudo-type used where no actual type is appropriate.
NoType
public static final TypeKind NULL
The null type.
public static final TypeKind ARRAY
An array type.
public static final TypeKind DECLARED
A class or interface type.
public static final TypeKind ERROR
A class or interface type that could not be resolved.
public static final TypeKind TYPEVAR
A type variable.
public static final TypeKind WILDCARD
A wildcard type argument.
public static final TypeKind PACKAGE
A pseudo-type corresponding to a package element.
NoType
public static final TypeKind EXECUTABLE
A method, constructor, or initializer.
public static final TypeKind OTHER
An implementation-reserved type. This is not the type you are looking for.
public static final TypeKind UNION
A union type.
public static final TypeKind INTERSECTION
An intersection type.
public static TypeKind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TypeKind c : TypeKind.values()) System.out.println(c);
public static TypeKind valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
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()
Returns true
if this kind corresponds to a primitive type and false
otherwise.
true
if this kind corresponds to a primitive type
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.