public enum Primitives extends java.lang.Enum<Primitives>
Enum Constant and Description |
---|
BOOLEAN |
BYTE |
CHARACTER |
DOUBLE |
FLOAT |
INTEGER |
LONG |
SHORT |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
static Primitives |
fromClass(java.lang.Class clazz)
Find a wrapper from a primitive class
|
java.lang.Object |
getDefaultInstance()
Initialise a default instance of a primitive wrapper.
|
static Primitives |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Primitives[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Primitives BOOLEAN
public static final Primitives BYTE
public static final Primitives CHARACTER
public static final Primitives SHORT
public static final Primitives INTEGER
public static final Primitives LONG
public static final Primitives DOUBLE
public static final Primitives FLOAT
public static final Primitives UNKNOWN
public static Primitives[] values()
for (Primitives c : Primitives.values()) System.out.println(c);
public static Primitives valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.Object getDefaultInstance() throws java.lang.Exception
java.lang.Exception
- Reflection exceptionpublic static Primitives fromClass(java.lang.Class clazz)
clazz
- primitive class