AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
静态 Public 成员函数 | 静态包函数 | Private 成员函数 | 静态 Private 成员函数 | 静态 Private 属性 | 所有成员列表
com.google.gson.internal.Primitives类 参考

静态 Public 成员函数

static boolean isPrimitive (Type type)
 
static boolean isWrapperType (Type type)
 
static< T > Class< T > wrap (Class< T > type)
 
static< T > Class< T > unwrap (Class< T > type)
 

静态包函数

 [static initializer]
 

Private 成员函数

 Primitives ()
 

静态 Private 成员函数

static void add (Map< Class<?>, Class<?>> forward, Map< Class<?>, Class<?>> backward, Class<?> key, Class<?> value)
 

静态 Private 属性

static final Map< Class
<?>, Class<?> > 
PRIMITIVE_TO_WRAPPER_TYPE
 
static final Map< Class
<?>, Class<?> > 
WRAPPER_TO_PRIMITIVE_TYPE
 

详细描述

Contains static utility methods pertaining to primitive types and their corresponding wrapper types.

作者
Kevin Bourrillion

构造及析构函数说明

com.google.gson.internal.Primitives.Primitives ( )
inlineprivate

成员函数说明

com.google.gson.internal.Primitives.[static initializer] ( )
inlinestaticpackage
static void com.google.gson.internal.Primitives.add ( Map< Class<?>, Class<?>>  forward,
Map< Class<?>, Class<?>>  backward,
Class<?>  key,
Class<?>  value 
)
inlinestaticprivate
static boolean com.google.gson.internal.Primitives.isPrimitive ( Type  type)
inlinestatic

Returns true if this type is a primitive.

static boolean com.google.gson.internal.Primitives.isWrapperType ( Type  type)
inlinestatic

Returns

true

if

type

is one of the nine primitive-wrapper types, such as Integer.

参见
Class::isPrimitive
static <T> Class<T> com.google.gson.internal.Primitives.unwrap ( Class< T >  type)
inlinestatic

Returns the corresponding primitive type of

type

if it is a wrapper type; otherwise returns

type

itself. Idempotent.

    unwrap(Integer.class) == int.class
    unwrap(int.class) == int.class
    unwrap(String.class) == String.class
static <T> Class<T> com.google.gson.internal.Primitives.wrap ( Class< T >  type)
inlinestatic

Returns the corresponding wrapper type of

type

if it is a primitive type; otherwise returns

type

itself. Idempotent.

    wrap(int.class) == Integer.class
    wrap(Integer.class) == Integer.class
    wrap(String.class) == String.class

类成员变量说明

final Map<Class<?>, Class<?> > com.google.gson.internal.Primitives.PRIMITIVE_TO_WRAPPER_TYPE
staticprivate

A map from primitive types to their corresponding wrapper types.

final Map<Class<?>, Class<?> > com.google.gson.internal.Primitives.WRAPPER_TO_PRIMITIVE_TYPE
staticprivate

A map from wrapper types to their corresponding primitive types.


该类的文档由以下文件生成: