public class TypeUtils
extends java.lang.Object
Constructor and Description |
---|
TypeUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
convertPrimitiveToWrapperType(java.lang.Class<?> primitive) |
static java.lang.Class<?> |
convertWrapperToPrimitiveType(java.lang.Class<?> wrapperType) |
static boolean |
isBigDecimalType(java.lang.Class<?> type)
Checks if the type is a BigDecimal type.
|
static boolean |
isBooleanType(java.lang.Class<?> type)
Checks if the type is a boolean type.
|
static boolean |
isIntegerType(java.lang.Class<?> type)
Checks if the type is an integer type.
|
static boolean |
isLongType(java.lang.Class<?> type)
Checks if the type is a long type.
|
static boolean |
isNumericType(java.lang.Class<?> type)
Checks if the type is a numeric type.
|
static boolean |
isPrimitive(java.lang.Class<?> primitive) |
static boolean |
isPrimitiveWrapper(java.lang.Class<?> wrapperType) |
static boolean |
isStringType(java.lang.Class<?> type)
Checks if the type is a string type.
|
static boolean |
isTemporalType(java.lang.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(java.lang.Class<?> type)
Checks if the type is a type that can be visualized such as color, image or icon.
|
public static boolean isPrimitive(java.lang.Class<?> primitive)
public static boolean isPrimitiveWrapper(java.lang.Class<?> wrapperType)
public static java.lang.Class<?> convertPrimitiveToWrapperType(java.lang.Class<?> primitive)
public static java.lang.Class<?> convertWrapperToPrimitiveType(java.lang.Class<?> wrapperType)
public static boolean isNumericType(java.lang.Class<?> type)
type
- the data type.public static boolean isIntegerType(java.lang.Class<?> type)
type
- the data type.public static boolean isLongType(java.lang.Class<?> type)
type
- the data type.public static boolean isBigDecimalType(java.lang.Class<?> type)
type
- the data type.public static boolean isStringType(java.lang.Class<?> type)
type
- the data type.public static boolean isBooleanType(java.lang.Class<?> type)
type
- the data type.public static boolean isTemporalType(java.lang.Class<?> type)
type
- the data type.public static boolean isVisualType(java.lang.Class<?> type)
type
- the data type.