public abstract class TypeReference<T extends Type> extends java.lang.Object implements java.lang.Comparable<TypeReference<T>>
Array types.
See this blog post for further details.
It may make sense to switch to using Java's reflection Type to avoid working around this fundamental generics limitation.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TypeReference.StaticArrayTypeReference<T extends Type> |
| 限定符 | 构造器和说明 |
|---|---|
protected |
TypeReference() |
protected |
TypeReference(boolean indexed) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(TypeReference<T> o) |
static <T extends Type> |
create(java.lang.Class<T> cls) |
java.lang.Class<T> |
getClassType()
Workaround to ensure type does not come back as T due to erasure, this enables you to
create a TypeReference via
Class<T>. |
java.lang.reflect.Type |
getType() |
boolean |
isIndexed() |
protected TypeReference()
protected TypeReference(boolean indexed)
public int compareTo(TypeReference<T> o)
compareTo 在接口中 java.lang.Comparable<TypeReference<T extends Type>>public java.lang.reflect.Type getType()
public boolean isIndexed()
public java.lang.Class<T> getClassType() throws java.lang.ClassNotFoundException
Class<T>.java.lang.ClassNotFoundException - if the class type cannot be determinedpublic static <T extends Type> TypeReference<T> create(java.lang.Class<T> cls)