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