public class ClassTypeUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static com.alibaba.fastjson.serializer.SerializerFeature[] |
FAST_JSON_FEATURES
fastjson features
|
private static String |
GENERIC_START_SYMBOL |
private static org.apache.dubbo.common.logger.Logger |
LOG |
private static int |
PROCESS_COUNT_MAX |
| 构造器和说明 |
|---|
ClassTypeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
calss2Json(Type genericType,
Class<?> classType) |
static List<Field> |
getAllFields(List<Field> fieldList,
Class<?> classz)
Get all fields in the class.
|
static Object |
initClassTypeWithDefaultValue(Type genericType,
Class<?> classType,
int processCount,
boolean isBuildClassAttribute,
Map<String,String> methodPrarmGenericTypeAndNamesMap)
Instantiate class and its fields.
|
static Object |
initClassTypeWithDefaultValue(Type genericType,
Class<?> classType,
int processCount,
Map<String,String> methodPrarmGenericTypeAndNamesMap)
Instantiate class and its fields.
|
static Object |
initClassTypeWithDefaultValueNoProceeField(Type genericType,
Class<?> classType,
int processCount,
Map<String,String> methodPrarmGenericTypeAndNamesMap) |
static boolean |
isBaseType(Object o)
Check if it is a basic data type.
|
static Class<?> |
makeClass(String className) |
static ParameterizedType |
makeParameterizedType(String typeName) |
private static Type[] |
makeSubClass(String... classNames) |
private static final org.apache.dubbo.common.logger.Logger LOG
public static com.alibaba.fastjson.serializer.SerializerFeature[] FAST_JSON_FEATURES
private static final int PROCESS_COUNT_MAX
public static Object initClassTypeWithDefaultValue(Type genericType, Class<?> classType, int processCount, Map<String,String> methodPrarmGenericTypeAndNamesMap)
genericType - genericTypeclassType - classTypeprocessCount - processCountpublic static Object initClassTypeWithDefaultValue(Type genericType, Class<?> classType, int processCount, boolean isBuildClassAttribute, Map<String,String> methodPrarmGenericTypeAndNamesMap)
genericType - genericTypeclassType - classTypeprocessCount - processCountisBuildClassAttribute - isBuildClassAttributepublic static Object initClassTypeWithDefaultValueNoProceeField(Type genericType, Class<?> classType, int processCount, Map<String,String> methodPrarmGenericTypeAndNamesMap)
public static boolean isBaseType(Object o)
o - public static List<Field> getAllFields(List<Field> fieldList, Class<?> classz)
fieldList - fieldListclassz - classzpublic static ParameterizedType makeParameterizedType(String typeName)
Copyright © 2020–2021 The Apache Software Foundation. All rights reserved.