| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | GsonTypes.
The WildcardType interface supports multiple upper bounds and multiple lower bounds. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Type[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static GenericArrayType | |
| public static Type | canonicalize(Type type)
Returns a type that is functionally equal but not necessarily equal according to |
| pack-priv static void | |
| private static Class | declaringClassOf(TypeVariable<?> typeVariable)
Returns the declaring class of |
| private static boolean | |
| public static boolean | |
| public static Type | |
| public static Type | getCollectionElementType(Type context, Class<?> contextRawType)
Returns the element type of this collection type. |
| private static Type | getGenericSupertype(Type context, Class<?> rawType, Class<?> supertype)
Returns the generic supertype for |
| public static Type[] | getMapKeyAndValueTypes(Type context, Class<?> contextRawType)
Returns a two element array containing this map's key and value types in positions 0 and 1 respectively. |
| public static Class | |
| private static Type | getSupertype(Type context, Class<?> contextRawType, Class<?>
a superclass of, or interface implemented by, this. supertype)Returns the generic form of |
| private static int | |
| public static ParameterizedType | Returns: a parameterized type.Returns a new parameterized type, applying |
| public static boolean | requiresOwnerType(Type rawType)
Whether an owner type must be specified when
constructing a |
| public static Type | |
| private static Type | |
| private static Type | |
| public static WildcardType | |
| public static WildcardType | |
| public static String |
| EMPTY_TYPE_ARRAY | back to summary |
|---|---|
| pack-priv static final Type[] EMPTY_TYPE_ARRAY | |
| GsonTypes | back to summary |
|---|---|
| private GsonTypes() | |
| arrayOf | back to summary |
|---|---|
| public static GenericArrayType arrayOf(Type componentType) Returns an array type whose elements are all instances of
| |
| canonicalize | back to summary |
|---|---|
| public static Type canonicalize(Type type) Returns a type that is functionally equal but not necessarily equal according to | |
| checkNotPrimitive | back to summary |
|---|---|
| pack-priv static void checkNotPrimitive(Type type) | |
| declaringClassOf | back to summary |
|---|---|
| private static Class Returns the declaring class of | |
| equal | back to summary |
|---|---|
| private static boolean equal(Object a, Object b) | |
| equals | back to summary |
|---|---|
| public static boolean equals(Type a, Type b) Returns true if | |
| getArrayComponentType | back to summary |
|---|---|
| public static Type getArrayComponentType(Type array) Returns the component type of this array type.
| |
| getCollectionElementType | back to summary |
|---|---|
| public static Type getCollectionElementType(Type context, Class<?> contextRawType) Returns the element type of this collection type.
| |
| getGenericSupertype | back to summary |
|---|---|
| private static Type getGenericSupertype(Type context, Class<?> rawType, Class<?> supertype) Returns the generic supertype for | |
| getMapKeyAndValueTypes | back to summary |
|---|---|
| public static Type[] getMapKeyAndValueTypes(Type context, Class<?> contextRawType) Returns a two element array containing this map's key and value types in positions 0 and 1 respectively. | |
| getRawType | back to summary |
|---|---|
| public static Class | |
| getSupertype | back to summary |
|---|---|
| private static Type getSupertype(Type context, Class<?> contextRawType, Class<?> supertype) Returns the generic form of
| |
| indexOf | back to summary |
|---|---|
| private static int indexOf(Object[] array, Object toFind) | |
| newParameterizedTypeWithOwner | back to summary |
|---|---|
| public static ParameterizedType newParameterizedTypeWithOwner(Type ownerType, Class<?> rawType, Type... typeArguments) Returns a new parameterized type, applying
| |
| requiresOwnerType | back to summary |
|---|---|
| public static boolean requiresOwnerType(Type rawType) Whether an owner type must be specified when
constructing a Note that this method might not require an owner type for all cases where Java reflection would create parameterized types with owner type. | |
| resolve | back to summary |
|---|---|
| public static Type resolve(Type context, Class<?> contextRawType, Type toResolve) | |
| resolve | back to summary |
|---|---|
| private static Type resolve(Type context, Class<?> contextRawType, Type toResolve, Map<TypeVariable<?>, Type> visitedTypeVariables) | |
| resolveTypeVariable | back to summary |
|---|---|
| private static Type resolveTypeVariable(Type context, Class<?> contextRawType, TypeVariable<?> unknown) | |
| subtypeOf | back to summary |
|---|---|
| public static WildcardType subtypeOf(Type bound) Returns a type that represents an unknown type that extends | |
| supertypeOf | back to summary |
|---|---|
| public static WildcardType supertypeOf(Type bound) Returns a type that represents an unknown supertype of | |
| typeToString | back to summary |
|---|---|
| public static String typeToString(Type type) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Type |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Type | getGenericComponentType()
Implements java. Returns a |
| public int | |
| public String |
| componentType | back to summary |
|---|---|
| private final Type componentType | |
| GenericArrayTypeImpl | back to summary |
|---|---|
| pack-priv GenericArrayTypeImpl(Type componentType) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getGenericComponentType | back to summary |
|---|---|
| public Type getGenericComponentType() Implements java. Doc from java. Returns a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Type | |
| private final Type | |
| private final Type[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object other)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Type[] | getActualTypeArguments()
Implements java. Returns an array of |
| public Type | getOwnerType()
Implements java. Returns a |
| public Type | getRawType()
Implements java. Returns the |
| public int | |
| private static int | |
| public String |
| ownerType | back to summary |
|---|---|
| private final Type ownerType | |
| rawType | back to summary |
|---|---|
| private final Type rawType | |
| typeArguments | back to summary |
|---|---|
| private final Type[] typeArguments | |
| ParameterizedTypeImpl | back to summary |
|---|---|
| pack-priv ParameterizedTypeImpl(Type ownerType, Class<?> rawType, Type... typeArguments) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getActualTypeArguments | back to summary |
|---|---|
| public Type[] getActualTypeArguments() Implements java. Doc from java. Returns an array of Note that in some cases, the returned array be empty. This can occur if this type represents a non-parameterized type nested within a parameterized type.
| |
| getOwnerType | back to summary |
|---|---|
| public Type getOwnerType() Implements java. Doc from java. Returns a If this type is a top-level type,
| |
| getRawType | back to summary |
|---|---|
| public Type getRawType() Implements java. Doc from java. Returns the
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hashCodeOrZero | back to summary |
|---|---|
| private static int hashCodeOrZero(Object o) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object other)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Type[] | getLowerBounds()
Implements java. Returns an array of |
| public Type[] | getUpperBounds()
Implements java. Returns an array of |
| public int | |
| public String |
| lowerBound | back to summary |
|---|---|
| private final Type lowerBound | |
| upperBound | back to summary |
|---|---|
| private final Type upperBound | |
| WildcardTypeImpl | back to summary |
|---|---|
| pack-priv WildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getLowerBounds | back to summary |
|---|---|
| public Type[] getLowerBounds() Implements java. Doc from java. Returns an array of For each lower bound B :
| |
| getUpperBounds | back to summary |
|---|---|
| public Type[] getUpperBounds() Implements java. Doc from java. Returns an array of For each upper bound B :
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |