public class ReflectUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ReflectUtils.FieldListener |
| Constructor and Description |
|---|
ReflectUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyValue(Method method,
Object value,
Object instance) |
static void |
copyValue(ReflectBean bean,
Object value,
Object instance) |
static boolean |
exclude(Class clazz,
String fieldName) |
static Annotation |
getAnnotation(Class clazz,
String fieldName,
Class<? extends Annotation> annClass) |
static Annotation |
getAnnotation(Class clazz,
String fieldName,
Class<? extends Annotation> annClass,
boolean isThrow) |
static Annotation |
getAnnotationByReadMethod(Class clazz,
String fieldName,
Class<? extends Annotation> annClass) |
static Map<String,ReflectBean> |
getBeanMap(Class clazz,
int type,
Boolean ignoreCase) |
static Field |
getField(Class clazz,
String fieldName) |
static Field |
getFieldByName(Class clazz,
String fieldName) |
static Map<String,Field> |
getFields(Class clazz) |
static Map<String,Method> |
getMap(Class clazz,
int type,
ReflectUtils.FieldListener fieldListener) |
static Map<String,Method> |
getReadMapper(Class clazz) |
static Map<String,Method> |
getReadMapper(Class clazz,
ReflectUtils.FieldListener fieldListener) |
static Map<String,Method> |
getWriteMap(Class clazz) |
static Map<String,Method> |
getWriteMap(Class clazz,
ReflectUtils.FieldListener fieldListener) |
static boolean |
hasField(Class clazz,
String fieldName) |
static boolean |
isCache() |
static void |
setCache(boolean cache) |
static void |
setValue(Method method,
Object value,
Object instance) |
static void |
setValue(ReflectBean bean,
Object value,
Object instance) |
static void |
setValue(String fieldName,
Object value,
Object instance) |
public static final int READ
public static final int WRITE
public static Annotation getAnnotation(Class clazz, String fieldName, Class<? extends Annotation> annClass) throws ValidException
ValidExceptionpublic static Annotation getAnnotationByReadMethod(Class clazz, String fieldName, Class<? extends Annotation> annClass)
public static Annotation getAnnotation(Class clazz, String fieldName, Class<? extends Annotation> annClass, boolean isThrow) throws ValidException
ValidExceptionpublic static boolean isCache()
public static void setCache(boolean cache)
public static Map<String,Method> getReadMapper(Class clazz) throws IntrospectionException
IntrospectionExceptionpublic static Map<String,Method> getReadMapper(Class clazz, ReflectUtils.FieldListener fieldListener) throws IntrospectionException
IntrospectionExceptionpublic static Map<String,Method> getMap(Class clazz, int type, ReflectUtils.FieldListener fieldListener)
public static Map<String,Method> getWriteMap(Class clazz) throws IntrospectionException
IntrospectionExceptionpublic static Map<String,Method> getWriteMap(Class clazz, ReflectUtils.FieldListener fieldListener) throws IntrospectionException
IntrospectionExceptionpublic static Map<String,ReflectBean> getBeanMap(Class clazz, int type, Boolean ignoreCase)
public static void copyValue(ReflectBean bean, Object value, Object instance)
public static void setValue(String fieldName, Object value, Object instance) throws ValidException
ValidExceptionpublic static void setValue(ReflectBean bean, Object value, Object instance)
Copyright © 2020. All rights reserved.