public class TypeUtils extends Object
Constructor and Description |
---|
TypeUtils() |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
convertPrimitiveToWrapperType(Class<?> primitive) |
static Class<?> |
convertWrapperToPrimitiveType(Class<?> wrapperType) |
static boolean |
isNumericType(Class<?> type)
Checks if the type is a numeric type.
|
static boolean |
isPrimitive(Class<?> primitive) |
static boolean |
isPrimitiveWrapper(Class<?> wrapperType) |
static boolean |
isTemporalType(Class<?> type)
Checks if the type is a temporal type such as Date, Calendar, long or double that can be used to represent date or time.
|
static boolean |
isVisualType(Class<?> type)
Checks if the type is a type that can be visualized such as color, image or icon.
|
public static boolean isPrimitive(Class<?> primitive)
public static boolean isPrimitiveWrapper(Class<?> wrapperType)
public static Class<?> convertPrimitiveToWrapperType(Class<?> primitive)
public static Class<?> convertWrapperToPrimitiveType(Class<?> wrapperType)
public static boolean isNumericType(Class<?> type)
type
- the data type.public static boolean isTemporalType(Class<?> type)
type
- the data type.public static boolean isVisualType(Class<?> type)
type
- the data type.