public class ClassUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> |
primitiveWrapperMap
Maps primitive
Classes to their corresponding wrapper Class. |
private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> |
wrapperPrimitiveMap
Maps wrapper
Classes to their corresponding primitive types. |
| Constructor and Description |
|---|
ClassUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isPrimitiveOrWrapper(java.lang.Class<?> type)
Returns whether the given
type is a primitive or primitive wrapper (Boolean, Byte,
Character,
Short, Integer, Long, Double, Float). |
static boolean |
isPrimitiveWrapper(java.lang.Class<?> type)
Returns whether the given
type is a primitive wrapper (Boolean, Byte, Character,
Short,
Integer, Long, Double, Float). |
private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> primitiveWrapperMap
Classes to their corresponding wrapper Class.private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> wrapperPrimitiveMap
Classes to their corresponding primitive types.public static boolean isPrimitiveOrWrapper(java.lang.Class<?> type)
type is a primitive or primitive wrapper (Boolean, Byte,
Character,
Short, Integer, Long, Double, Float).type - The class to query or null.type is a primitive or primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).public static boolean isPrimitiveWrapper(java.lang.Class<?> type)
type is a primitive wrapper (Boolean, Byte, Character,
Short,
Integer, Long, Double, Float).type - The class to query or null.type is a primitive wrapper (Boolean, Byte, Character,
Short, Integer, Long, Double, Float).