AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
包属性 | 所有成员列表
com.google.gson.reflect.TypeToken< T >类 参考

包属性

final Class<?super T > rawType
 
final Type type
 
final int hashCode
 

详细描述

Represents a generic type

T

. Java doesn't yet provide a way to represent generic types, so this class does. Forces clients to create a subclass of this class which enables retrieval the type information even at runtime.

For example, to create a type literal for

List<String>

, you can create an empty anonymous inner class:

TypeToken<List<String>> list = new TypeToken<List<String>>() {};

This syntax cannot be used to create type literals that have wildcard parameters, such as

Class<?>

or

List<? extends CharSequence>

.

作者
Bob Lee
Sven Mawson
Jesse Wilson

类成员变量说明

final int com.google.gson.reflect.TypeToken< T >.hashCode
package
final Class<? super T> com.google.gson.reflect.TypeToken< T >.rawType
package
final Type com.google.gson.reflect.TypeToken< T >.type
package

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