|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<EJavaPrimitive>
edu.tum.cs.commons.reflect.EJavaPrimitive
public enum EJavaPrimitive
Enumeration of Java primitives.
Enum Constant Summary | |
---|---|
BOOLEAN
boolean |
|
BYTE
byte |
|
CHAR
char |
|
DOUBLE
double |
|
FLOAT
float |
|
INT
int |
|
LONG
long |
|
SHORT
short |
|
VOID
void |
Method Summary | |
---|---|
java.lang.Class<?> |
getClassObject()
Get the class object of the primitive. |
static EJavaPrimitive |
getForPrimitiveClass(java.lang.Class<?> clazz)
Returns the enum literal belonging to the given primitive class (or null). |
static EJavaPrimitive |
getForPrimitiveOrWrapperClass(java.lang.Class<?> clazz)
Returns the enum literal belonging to the given primitive or wrapper class (or null). |
static EJavaPrimitive |
getForWrapperClass(java.lang.Class<?> clazz)
Returns the enum literal belonging to the given wrapper class (or null). |
static EJavaPrimitive |
getPrimitive(java.lang.String name)
Get primitive by name. |
static EJavaPrimitive |
getPrimitiveIgnoreCase(java.lang.String name)
Get primitive by name ignoring case. |
java.lang.Class<?> |
getWrapperClass()
Returns the wrapper class for the primitive. |
static boolean |
isWrapperType(java.lang.Class<?> clazz)
Returns whether the given class is a wrapper type for a primitive. |
static EJavaPrimitive |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static EJavaPrimitive[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final EJavaPrimitive VOID
public static final EJavaPrimitive BYTE
public static final EJavaPrimitive CHAR
public static final EJavaPrimitive DOUBLE
public static final EJavaPrimitive FLOAT
public static final EJavaPrimitive INT
public static final EJavaPrimitive LONG
public static final EJavaPrimitive SHORT
public static final EJavaPrimitive BOOLEAN
Method Detail |
---|
public static EJavaPrimitive[] values()
for (EJavaPrimitive c : EJavaPrimitive.values()) System.out.println(c);
public static EJavaPrimitive 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 name
java.lang.NullPointerException
- if the argument is nullpublic java.lang.Class<?> getClassObject()
public java.lang.Class<?> getWrapperClass()
public static EJavaPrimitive getPrimitive(java.lang.String name)
null
if unknown primitive was
requestedpublic static EJavaPrimitive getPrimitiveIgnoreCase(java.lang.String name)
null
if unknown primitive was
requestedpublic static EJavaPrimitive getForPrimitiveClass(java.lang.Class<?> clazz)
public static EJavaPrimitive getForWrapperClass(java.lang.Class<?> clazz)
public static EJavaPrimitive getForPrimitiveOrWrapperClass(java.lang.Class<?> clazz)
public static boolean isWrapperType(java.lang.Class<?> clazz)
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |