public class ClassUtil extends Object
| Constructor and Description |
|---|
ClassUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Field[] |
getAnnotatedDeclaredFields(Class clazz,
Class<? extends Annotation> annotationClass,
boolean recursively)
Retrieving fields list of specified class and which are annotated by
incoming annotation class If recursively is true, retrieving fields from
all class hierarchy
|
static Field[] |
getDeclaredFields(Class clazz,
boolean recursively)
Retrieving fields list of specified class If recursively is true,
retrieving fields from all class hierarchy
|
static List<Object> |
getFixedViewObjectAsRow(Class clazz,
Object object) |
public static Field[] getDeclaredFields(Class clazz, boolean recursively)
clazz - the class for which we want to get declared fieldsrecursively - whether to search recursively up the super class chainpublic static Field[] getAnnotatedDeclaredFields(Class clazz, Class<? extends Annotation> annotationClass, boolean recursively)
clazz - the class for which we want to get declared fieldsannotationClass - - specified annotation classrecursively - whether to search recursively up the super class chainCopyright © 2020. All rights reserved.