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 |
isBigDecimalType(Class<?> type)
Checks if the type is a BigDecimal type.
|
static boolean |
isBooleanType(Class<?> type)
Checks if the type is a boolean type.
|
static boolean |
isIntegerType(Class<?> type)
Checks if the type is an integer type.
|
static boolean |
isLongType(Class<?> type)
Checks if the type is a long type.
|
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 |
isStringType(Class<?> type)
Checks if the type is a string type.
|
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 isIntegerType(Class<?> type)
type
- the data type.public static boolean isLongType(Class<?> type)
type
- the data type.public static boolean isBigDecimalType(Class<?> type)
type
- the data type.public static boolean isStringType(Class<?> type)
type
- the data type.public static boolean isBooleanType(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.