public enum BasicType extends Enum<BasicType>
Enum Constant and Description |
---|
BOOLEAN |
BYTE |
CHAR |
CHARACTER |
DOUBLE |
FLOAT |
INT |
INTEGER |
LONG |
SHORT |
STRING |
Modifier and Type | Field and Description |
---|---|
static Map<Class<?>,Class<?>> |
PRIMITIVE_WRAPPER_MAP
原始类型为Key,包装类型为Value,例如: int.class =》 Integer.class.
|
static Map<Class<?>,Class<?>> |
WRAPPER_PRIMITIVE_MAP
包装类型为Key,原始类型为Value,例如: Integer.class =》 int.class.
|
Modifier and Type | Method and Description |
---|---|
static Class<?> |
unWrap(Class<?> clazz)
包装类转为原始类,非包装类返回原类
|
static BasicType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BasicType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static Class<?> |
wrap(Class<?> clazz)
原始类转为包装类,非原始类返回原类
|
public static final BasicType BYTE
public static final BasicType SHORT
public static final BasicType INT
public static final BasicType INTEGER
public static final BasicType LONG
public static final BasicType DOUBLE
public static final BasicType FLOAT
public static final BasicType BOOLEAN
public static final BasicType CHAR
public static final BasicType CHARACTER
public static final BasicType STRING
public static final Map<Class<?>,Class<?>> WRAPPER_PRIMITIVE_MAP
public static BasicType[] values()
for (BasicType c : BasicType.values()) System.out.println(c);
public static BasicType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Class<?> wrap(Class<?> clazz)
clazz
- 原始类Copyright © 2025. All rights reserved.