public class Utils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static List<TypeReference<Type>> |
convert(List<TypeReference<?>> input) |
static <T extends Type> |
extractParameterFromAnnotation(Annotation[] parameterAnnotation) |
static Constructor |
findStructConstructor(Class classType) |
static TypeReference<DynamicArray> |
getDynamicArrayTypeReference(Class parameter) |
static <T extends Type> |
getFullParameterizedTypeFromArray(TypeReference typeReference) |
static <T extends Type> |
getParameterizedTypeFromArray(TypeReference typeReference) |
static String |
getSimpleTypeName(Class<?> type) |
static String |
getStructType(Class type) |
static String |
getTypeName(Type type) |
static <T extends Type> |
getTypeName(TypeReference<T> typeReference) |
static List<Field> |
staticStructNestedPublicFieldsFlatList(Class<Type> classType)
Returns flat list of canonical fields in a static struct.
|
static List<Field> |
staticStructsNestedFieldsFlatList(Class<Type> classType)
Goes over a static structs and enumerates all of its fields and nested structs fields
recursively.
|
static <T,R extends Type<T>,E extends Type<T>> |
typeMap(List<List<T>> input,
Class<E> outerDestType,
Class<R> innerType) |
static <T,R extends Type<T>> |
typeMap(List<T> input,
Class<R> destType) |
public static <T extends Type> String getTypeName(TypeReference<T> typeReference)
public static TypeReference<DynamicArray> getDynamicArrayTypeReference(Class parameter)
public static <T extends Type> Class<T> extractParameterFromAnnotation(Annotation[] parameterAnnotation)
public static Constructor findStructConstructor(Class classType)
public static <T extends Type> Class<T> getParameterizedTypeFromArray(TypeReference typeReference) throws ClassNotFoundException
public static <T extends Type> Class<T> getFullParameterizedTypeFromArray(TypeReference typeReference) throws ClassNotFoundException
public static List<TypeReference<Type>> convert(List<TypeReference<?>> input)
public static <T,R extends Type<T>,E extends Type<T>> List<E> typeMap(List<List<T>> input, Class<E> outerDestType, Class<R> innerType)
public static <T,R extends Type<T>> List<R> typeMap(List<T> input, Class<R> destType) throws TypeMappingException
public static List<Field> staticStructNestedPublicFieldsFlatList(Class<Type> classType)
classType - Static struct typepublic static List<Field> staticStructsNestedFieldsFlatList(Class<Type> classType)
classType - Static struct typeCopyright © 2025. All rights reserved.