public abstract class TypeReference<T extends Type> extends Object implements Comparable<TypeReference<T>>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TypeReference.StaticArrayTypeReference<T extends Type> |
| 限定符和类型 | 字段和说明 |
|---|---|
protected static Pattern |
ARRAY_SUFFIX |
| 限定符 | 构造器和说明 |
|---|---|
protected |
TypeReference() |
protected |
TypeReference(boolean indexed) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(TypeReference<T> o) |
static <T extends Type> |
create(Class<T> cls) |
static <T extends Type> |
create(Class<T> cls,
boolean indexed) |
protected static Class<? extends Type> |
getAtomicTypeClass(String solidityType,
boolean primitives)
This is a helper method that only works for atomic types (uint, bytes, etc).
|
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>. |
TypeReference |
getSubTypeReference() |
Type |
getType() |
boolean |
isIndexed() |
static TypeReference |
makeTypeReference(String solidityType) |
static TypeReference |
makeTypeReference(String solidityType,
boolean indexed,
boolean primitives) |
protected static Pattern ARRAY_SUFFIX
protected TypeReference()
protected TypeReference(boolean indexed)
public static <T extends Type> TypeReference<T> create(Class<T> cls)
public static <T extends Type> TypeReference<T> create(Class<T> cls, boolean indexed)
protected static Class<? extends Type> getAtomicTypeClass(String solidityType, boolean primitives) throws ClassNotFoundException
ParameterizedType.solidityType - the solidity as a string eg Address Intprimitives - is it a primitive typeClassNotFoundException - when the class cannot be found.public static TypeReference makeTypeReference(String solidityType) throws ClassNotFoundException
public static TypeReference makeTypeReference(String solidityType, boolean indexed, boolean primitives) throws ClassNotFoundException
public TypeReference getSubTypeReference()
public int compareTo(TypeReference<T> o)
compareTo 在接口中 Comparable<TypeReference<T extends Type>>public Type getType()
public boolean isIndexed()
public Class<T> getClassType() throws ClassNotFoundException
Class<T>.ClassNotFoundException - if the class type cannot be determinedCopyright © 2025. All rights reserved.