Class FieldUtils


  • public class FieldUtils
    extends Object
    Utility class to operate on fields on a class.
    • Constructor Detail

      • FieldUtils

        public FieldUtils()
    • Method Detail

      • getAllFields

        public static <T> List<Field> getAllFields​(T t)
      • getAllFields

        public static <T> List<Field> getAllFields​(Class<T> klass)
      • getAllFieldsWithAnnotation

        public static <T,​S extends AnnotationList<Field> getAllFieldsWithAnnotation​(T t,
                                                                                            Class<S> annotationKlass)
      • getAllFieldsWithAnnotation

        public static <T,​S extends AnnotationList<Field> getAllFieldsWithAnnotation​(Class<T> klass,
                                                                                            Class<S> annotationKlass)
      • getFieldWithAnnotation

        public static <T,​S extends AnnotationField getFieldWithAnnotation​(T t,
                                                                                  Class<S> annotationKlass)
      • setFieldValue

        public static void setFieldValue​(Field field,
                                         Object o,
                                         Object value)