Class FieldUtils
- java.lang.Object
-
- com.alpha.mongodb.entitymanager.utils.FieldUtils
-
public class FieldUtils extends Object
Utility class to operate on fields on a class.
-
-
Constructor Summary
Constructors Constructor Description FieldUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> List<Field>
getAllFields(Class<T> klass)
static <T> List<Field>
getAllFields(T t)
static <T,S extends Annotation>
List<Field>getAllFieldsWithAnnotation(Class<T> klass, Class<S> annotationKlass)
static <T,S extends Annotation>
List<Field>getAllFieldsWithAnnotation(T t, Class<S> annotationKlass)
static Object
getFieldValue(Field field, Object o)
static <T,S extends Annotation>
Optional<Field>getFieldWithAnnotation(Class<T> klass, Class<S> annotationKlass)
static <T,S extends Annotation>
FieldgetFieldWithAnnotation(T t, Class<S> annotationKlass)
static void
setFieldValue(Field field, Object o, Object value)
-
-
-
Method Detail
-
getAllFieldsWithAnnotation
public static <T,S extends Annotation> List<Field> getAllFieldsWithAnnotation(T t, Class<S> annotationKlass)
-
getAllFieldsWithAnnotation
public static <T,S extends Annotation> List<Field> getAllFieldsWithAnnotation(Class<T> klass, Class<S> annotationKlass)
-
getFieldWithAnnotation
public static <T,S extends Annotation> Field getFieldWithAnnotation(T t, Class<S> annotationKlass)
-
getFieldWithAnnotation
public static <T,S extends Annotation> Optional<Field> getFieldWithAnnotation(Class<T> klass, Class<S> annotationKlass)
-
-