public class ClassUtils extends Object
| 构造器和说明 |
|---|
ClassUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Annotation> |
dataMapBy(Class<T> annotationClass,
Object data)
generate title — getMethod map by annotation
|
static Method |
methodGetterOf(String fieldName,
Class ofClass)
Get setter method of field
|
static <T extends Annotation> |
titleMapGetMethodBy(Class<T> annotationClass,
Class ofClass)
generate title — getMethod map by annotation
|
static <T extends Annotation> |
titleMapSetMethodBy(Class<T> annotationClass,
Class ofClass,
Map<String,Object> titleMapAnnotation)
generate title — setMethod map by annotation
|
public static <T extends Annotation> Map<T,Method> titleMapGetMethodBy(Class<T> annotationClass, Class ofClass) throws NoSuchMethodException
annotationClass - the annotation classofClass - the primary classNoSuchMethodException - No such methodpublic static <T extends Annotation> Map<String,Method> titleMapSetMethodBy(Class<T> annotationClass, Class ofClass, Map<String,Object> titleMapAnnotation) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
annotationClass - the annotation classofClass - the primary classtitleMapAnnotation - the map for title — annotation objectNoSuchMethodException - No such methodInvocationTargetException - Invocation targetIllegalAccessException - Illegal accesspublic static <T extends Annotation> Map<String,Object> dataMapBy(Class<T> annotationClass, Object data) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
annotationClass - the annotation classdata - data objects with template variables declared by annotationsNoSuchMethodException - No such methodInvocationTargetException - Invocation targetIllegalAccessException - Illegal accesspublic static Method methodGetterOf(String fieldName, Class ofClass) throws NoSuchMethodException, NoSuchFieldException
fieldName - The class field name stringofClass - The classNoSuchMethodException - No such methodNoSuchFieldException - No such fieldCopyright © 2019. All rights reserved.