T - the type that will be held by the TypeInfopublic abstract class TypeReference<T> extends TypeInfo
TypeInfo implementation which can be instantiated with a concrete type resolved at runtime for
easy creation of more complex Type implementations. For example, a parameterized type can be encapsulated in
a type reference the following way:
TypeInfo typeInfo = new TypeReference<List<String>>() {};
typeInfo.getType(); // List<String>
| Constructor and Description |
|---|
TypeReference()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Type |
inferTypeForNoArgsConstructor()
Called in the no-args constructor, allowing to infer the type through some other way.
|
equals, equalTo, getAllTypeInfos, getAllTypes, getComponentType, getEnclosingType, getSafeToReadClass, getType, getTypeArgumentAsClass, getTypeArgumentInfo, hashCode, isAssignableFrom, of, of, resolve, resolveSuperclass, toClass, toString, visitAllTypespublic TypeReference()
protected Type inferTypeForNoArgsConstructor()
TypeInfoinferTypeForNoArgsConstructor in class TypeInfoCopyright © 2023. All rights reserved.