类 | |
| 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.
|
inlineprivate |
|
inlinestatic |
Returns an array type whose elements are all instances of
.
|
inlinestatic |
Returns a type that is functionally equal but not necessarily equal according to Object.equals(). The returned type is java.io.Serializable.
|
inlinestaticprivate |
|
inlinestaticprivate |
Returns the declaring class of
, or
if it was not declared by a class.
|
inlinestaticpackage |
|
inlinestatic |
Returns true if
and
are equal.
|
inlinestatic |
Returns the component type of this array type.
| ClassCastException | if this type is not an array. |
|
inlinestatic |
Returns the element type of this collection type.
| IllegalArgumentException | if this type is not a collection. |
|
inlinestaticpackage |
Returns the generic supertype for
. For example, given a class
, the result for when supertype is
is
and the result when the supertype is
is
.
|
inlinestatic |
Returns a two element array containing this map's key and value types in positions 0 and 1 respectively.
|
inlinestatic |
|
inlinestaticpackage |
Returns the generic form of
. For example, if this is
, this returns
given the input
.
| supertype | a superclass of, or interface implemented by, this. |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestatic |
Returns a new parameterized type, applying
to
and enclosed by
.
|
inlinestatic |
|
inlinestaticpackage |
|
inlinestatic |
Returns a type that represents an unknown type that extends
. For example, if
is
, this returns
. If
is
, this returns
, which is shorthand for
.
|
inlinestatic |
Returns a type that represents an unknown supertype of
. For example, if
is
, this returns
.
|
inlinestatic |
|
staticpackage |
1.8.8