TypeLiteral.
TypeLiteral<List<String>> stringListType = new TypeLiteral<List<String>>() {};
| Modifier and Type | Field and Description |
|---|---|
| private transient Class | rawType
Store the actual raw parameter type. |
| private transient Type | type
Store the actual type (direct subclass of TypeLiteral). |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public final Type[] | Returns: A non-null (but possibly empty) array of types associated with this literalGets the types associated with this literal |
| public final Class | |
| public static Class | Returns: The base class for the type, or null if there is none (e.g., Wildcard)The non-null type to analyze type)Gets the base associated class from this type |
| public final Type | |
| private static Class | getTypeLiteralSubclass(Class<?>
processed class clazz)Return the direct child class that extends TypeLiteral<t> |
| private static Type | Returns: the parametrized type of TypeLiteralsubClass of TypeLiteral typeLiteralSubclass)Return the value of the type parameter of TypeLiteral<t>. |
| public int | |
| public String |
| rawType | back to summary |
|---|---|
| private transient Class<T> rawType Store the actual raw parameter type. | |
| type | back to summary |
|---|---|
| private transient Type type Store the actual type (direct subclass of TypeLiteral). | |
| TypeLiteral | back to summary |
|---|---|
| protected TypeLiteral() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) 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.
| |
| getParameterTypes | back to summary |
|---|---|
| public final Type[] getParameterTypes() Gets the types associated with this literal
| |
| getRawType | back to summary |
|---|---|
public final Class
| |
| getRawType | back to summary |
|---|---|
| public static Class Gets the base associated class from this type | |
| getType | back to summary |
|---|---|
public final Type getType()
| |
| getTypeLiteralSubclass | back to summary |
|---|---|
| private static Class Return the direct child class that extends TypeLiteral processed class
| |
| getTypeParameter | back to summary |
|---|---|
| private static Type getTypeParameter(Class<?> typeLiteralSubclass) Return the value of the type parameter of TypeLiteral | |
| 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-
| |