T - Generic Typepublic abstract class TypeReference<T> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
TypeReference() |
public Type getType()
public final Class<T> getRawType()
T. Formally speaking, if T is returned by
Method.getGenericReturnType(), the raw type is what's returned by
Method.getReturnType() of the same method object. Specifically:
T is a Class itself, T itself is returned.
T is a ParameterizedType, the raw type of the parameterized type is
returned.
T is a GenericArrayType, the returned type is the corresponding array
class. For example: List<Integer>[] => List[].
T is a type variable or a wildcard type, the raw type of the first upper bound
is returned. For example: <X extends Foo> => Foo.
Copyright © 2013–2016. All rights reserved.