| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
类 | 静态 Public 成员函数 | 静态包函数 | 静态包属性 | Private 成员函数 | 静态 Private 成员函数 | 所有成员列表
com.google.gson.internal.$Types类 参考

## 类
class | GenericArrayTypeImpl
class | ParameterizedTypeImpl
class | WildcardTypeImpl

## 静态 Public 成员函数
static ParameterizedType | newParameterizedTypeWithOwner (Type ownerType, Type rawType, Type...typeArguments)
static GenericArrayType | arrayOf (Type componentType)
static WildcardType | subtypeOf (Type bound)
static WildcardType | supertypeOf (Type bound)
static Type | canonicalize (Type type)
static Class<?> | getRawType (Type type)
static boolean | equals (Type a, Type b)
static String | typeToString (Type type)
static Type | getArrayComponentType (Type array)
static Type | getCollectionElementType (Type context, Class<?> contextRawType)
static Type[] | getMapKeyAndValueTypes (Type context, Class<?> contextRawType)
static Type | resolve (Type context, Class<?> contextRawType, Type toResolve)

## 静态包函数
static boolean | equal (Object a, Object b)
static Type | getGenericSupertype (Type context, Class<?> rawType, Class<?> toResolve)
static Type | getSupertype (Type context, Class<?> contextRawType, Class<?> supertype)
static Type | resolveTypeVariable (Type context, Class<?> contextRawType, TypeVariable<?> unknown)

## 静态包属性
static final Type[] | EMPTY_TYPE_ARRAY = new Type[] {}

## Private 成员函数
$Gson | $Types ()

## 静态 Private 成员函数
static int | hashCodeOrZero (Object o)
static int | indexOf (Object[] array, Object toFind)
static Class<?> | declaringClassOf (TypeVariable<?> typeVariable)
static void | checkNotPrimitive (Type type)

## 详细描述

Static methods for working with types.

作者
  Bob Lee
  Jesse Wilson

## 构造及析构函数说明

$Gson com.google.gson.internal.$Types.$Types | ( |  | ) |
| inline private

## 成员函数说明

static GenericArrayType com.google.gson.internal.$Types.arrayOf | ( | Type | componentType | ) |
| inline static

Returns an array type whose elements are all instances of

componentType

.

返回
  a serializable generic array type.

static Type com.google.gson.internal.$Types.canonicalize | ( | Type | type | ) |
| inline static

Returns a type that is functionally equal but not necessarily equal according to Object.equals(). The returned type is java.io.Serializable.

static void com.google.gson.internal.$Types.checkNotPrimitive | ( | Type | type | ) |
| inline static private

static Class<?> com.google.gson.internal.$Types.declaringClassOf | ( | TypeVariable<?> | typeVariable | ) |
| inline static private

Returns the declaring class of

typeVariable

, or

null

if it was not declared by a class.

static boolean com.google.gson.internal.$Types.equal | ( | Object | a,
|  | Object | b
| ) |  |
| inline static package

static boolean com.google.gson.internal.$Types.equals | ( | Type | a,
|  | Type | b
| ) |  |
| inline static

Returns true if

a

and

b

are equal.

static Type com.google.gson.internal.$Types.getArrayComponentType | ( | Type | array | ) |
| inline static

Returns the component type of this array type.

异常

  ClassCastException | if this type is not an array.

static Type com.google.gson.internal.$Types.getCollectionElementType | ( | Type | context,
|  | Class<?> | contextRawType
| ) |  |
| inline static

Returns the element type of this collection type.

异常

  IllegalArgumentException | if this type is not a collection.

static Type com.google.gson.internal.$Types.getGenericSupertype | ( | Type | context,
|  | Class<?> | rawType,
|  | Class<?> | toResolve
| ) |  |
| inline static package

Returns the generic supertype for

supertype

. For example, given a class

IntegerSet

, the result for when supertype is

Set.class

is

Set<Integer>

and the result when the supertype is

Collection.class

is

Collection<Integer>

.

static Type [] com.google.gson.internal.$Types.getMapKeyAndValueTypes | ( | Type | context,
|  | Class<?> | contextRawType
| ) |  |
| inline static

Returns a two element array containing this map's key and value types in positions 0 and 1 respectively.

static Class<?> com.google.gson.internal.$Types.getRawType | ( | Type | type | ) |
| inline static

static Type com.google.gson.internal.$Types.getSupertype | ( | Type | context,
|  | Class<?> | contextRawType,
|  | Class<?> | supertype
| ) |  |
| inline static package

Returns the generic form of

supertype

. For example, if this is

ArrayList<String>

, this returns

Iterable<String>

given the input

Iterable.class

.

参数

  supertype | a superclass of, or interface implemented by, this.

static int com.google.gson.internal.$Types.hashCodeOrZero | ( | Object | o | ) |
| inline static private

static int com.google.gson.internal.$Types.indexOf | ( | Object[] | array,
|  | Object | toFind
| ) |  |
| inline static private

static ParameterizedType com.google.gson.internal.$Types.newParameterizedTypeWithOwner | ( | Type | ownerType,
|  | Type | rawType,
|  | Type... | typeArguments
| ) |  |
| inline static

Returns a new parameterized type, applying

typeArguments

to

rawType

and enclosed by

ownerType

.

返回
  a serializable parameterized type.

static Type com.google.gson.internal.$Types.resolve | ( | Type | context,
|  | Class<?> | contextRawType,
|  | Type | toResolve
| ) |  |
| inline static

static Type com.google.gson.internal.$Types.resolveTypeVariable | ( | Type | context,
|  | Class<?> | contextRawType,
|  | TypeVariable<?> | unknown
| ) |  |
| inline static package

static WildcardType com.google.gson.internal.$Types.subtypeOf | ( | Type | bound | ) |
| inline static

Returns a type that represents an unknown type that extends

bound

. For example, if

bound

is

CharSequence.class

, this returns

? extends CharSequence

. If

bound

is

Object.class

, this returns

?

, which is shorthand for

? extends Object

.

static WildcardType com.google.gson.internal.$Types.supertypeOf | ( | Type | bound | ) |
| inline static

Returns a type that represents an unknown supertype of

bound

. For example, if

bound

is

String.class

, this returns

?
super String

.

static String com.google.gson.internal.$Types.typeToString | ( | Type | type | ) |
| inline static

## 类成员变量说明

final Type [] com.google.gson.internal.$Types.EMPTY_TYPE_ARRAY = new Type[] {}
| static package

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

- src/com/google/gson/internal/$Gson$Types.java