public static enum ReflectionHandler.DataType extends java.lang.Enum<ReflectionHandler.DataType>
This class is part of the ReflectionUtils and follows the same usage conditions
Enum Constant and Description |
---|
BOOLEAN |
BYTE |
CHARACTER |
DOUBLE |
FLOAT |
INTEGER |
LONG |
SHORT |
Modifier and Type | Method and Description |
---|---|
static boolean |
compare(java.lang.Class<?>[] primary,
java.lang.Class<?>[] secondary)
Compares two class arrays on equivalence
|
static ReflectionHandler.DataType |
fromClass(java.lang.Class<?> clazz)
Returns the data type with the given primitive/reference class
|
java.lang.Class<?> |
getPrimitive()
Returns the primitive class of this data type
|
static java.lang.Class<?> |
getPrimitive(java.lang.Class<?> clazz)
Returns the primitive class of the data type with the given reference
class
|
static java.lang.Class<?>[] |
getPrimitive(java.lang.Class<?>[] classes)
Returns the primitive class array of the given class array
|
static java.lang.Class<?>[] |
getPrimitive(java.lang.Object[] objects)
Returns the primitive class array of the given object array
|
java.lang.Class<?> |
getReference()
Returns the reference class of this data type
|
static java.lang.Class<?> |
getReference(java.lang.Class<?> clazz)
Returns the reference class of the data type with the given primitive
class
|
static java.lang.Class<?>[] |
getReference(java.lang.Class<?>[] classes)
Returns the reference class array of the given class array
|
static java.lang.Class<?>[] |
getReference(java.lang.Object[] objects)
Returns the reference class array of the given object array
|
static ReflectionHandler.DataType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ReflectionHandler.DataType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReflectionHandler.DataType BYTE
public static final ReflectionHandler.DataType SHORT
public static final ReflectionHandler.DataType INTEGER
public static final ReflectionHandler.DataType LONG
public static final ReflectionHandler.DataType CHARACTER
public static final ReflectionHandler.DataType FLOAT
public static final ReflectionHandler.DataType DOUBLE
public static final ReflectionHandler.DataType BOOLEAN
public static ReflectionHandler.DataType[] values()
for (ReflectionHandler.DataType c : ReflectionHandler.DataType.values()) System.out.println(c);
public static ReflectionHandler.DataType 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.Class<?> getPrimitive()
public java.lang.Class<?> getReference()
public static ReflectionHandler.DataType fromClass(java.lang.Class<?> clazz)
clazz
- Primitive/Reference class of the data typepublic static java.lang.Class<?> getPrimitive(java.lang.Class<?> clazz)
clazz
- Reference class of the data typepublic static java.lang.Class<?> getReference(java.lang.Class<?> clazz)
clazz
- Primitive class of the data typepublic static java.lang.Class<?>[] getPrimitive(java.lang.Class<?>[] classes)
classes
- Given class arraypublic static java.lang.Class<?>[] getReference(java.lang.Class<?>[] classes)
classes
- Given class arraypublic static java.lang.Class<?>[] getPrimitive(java.lang.Object[] objects)
objects
- Given object arraypublic static java.lang.Class<?>[] getReference(java.lang.Object[] objects)
objects
- Given object arraypublic static boolean compare(java.lang.Class<?>[] primary, java.lang.Class<?>[] secondary)
primary
- Primary class arraysecondary
- Class array which is compared to the primary array