java.lang.Object
org.seppiko.commons.utils.reflect.TypeUtil
Type util
- Author:
- Leonard Woo
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>get Object typestatic <T> TconvertObject(Object obj, Class<T> type) Convert Object to Class type.static TypeAndValue<?>parserNumberType(Number number) Parser number type.static Class<?>get type boxing class
-
Method Details
-
checkType
get Object type- Parameters:
obj- Object- Returns:
- object type class
-
warpper
get type boxing class- Parameters:
type- type class- Returns:
- boxing class
-
parserNumberType
Parser number type.- Parameters:
number- number.- Returns:
- number type and value.
-
convertObject
public static <T> T convertObject(Object obj, Class<T> type) throws NullPointerException, IllegalArgumentException Convert Object to Class type.- Type Parameters:
T- type.- Parameters:
obj- object.type- target class type.- Returns:
- Class type object.
- Throws:
NullPointerException- sql object is null.IllegalArgumentException- target type mismatch.
-