public class PrimitiveTypeUtil extends Object
| 构造器和说明 |
|---|
PrimitiveTypeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isPrimitive(Class<?> clz)
Determine the class is primitive or not.
|
static boolean |
isWrapper(Class<?> clz)
Determine the class is primitive wrapper or not.
|
static <T> T |
parse(Class<T> clz,
String objectValue)
Parse the string value to a primitive type
|
static int |
sizeOf(Class<?> clz)
Get the size of a primitive type.
|
static Class<?> |
toPrimitive(Class<?> wrapperType)
Get primitive type of wrapper class.
|
static Class<?> |
toWrapper(Class<?> primitiveType)
Get wrapper class of primitive type.
|
public static Class<?> toWrapper(Class<?> primitiveType)
primitiveType - public static Class<?> toPrimitive(Class<?> wrapperType)
wrapperType - public static boolean isPrimitive(Class<?> clz)
clz - public static boolean isWrapper(Class<?> clz)
clz - public static int sizeOf(Class<?> clz) throws IllegalArgumentException
clz - IllegalArgumentException - If the class is not primitive type.Copyright © 2017. All rights reserved.