@Test public void testGetAllField() { assertTrue(!FieldUtils.getAllField(FieldUtilsTest.class).isEmpty()); }
public static List<Field> getAllField(final Class<?> klass) { List<Field> result = new ArrayList<>(); for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) { for (Field field : target.getDeclaredFields()) { result.add(field); } } return result; }
FieldUtils { public static List<Field> getAllField(final Class<?> klass) { List<Field> result = new ArrayList<>(); for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) { for (Field field : target.getDeclaredFields()) { result.add(field); } } return result; } }
FieldUtils { public static List<Field> getAllField(final Class<?> klass) { List<Field> result = new ArrayList<>(); for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) { for (Field field : target.getDeclaredFields()) { result.add(field); } } return result; }  }
FieldUtils { public static List<Field> getAllField(final Class<?> klass) { List<Field> result = new ArrayList<>(); for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) { for (Field field : target.getDeclaredFields()) { result.add(field); } } return result; }  static void writeField(final Object target, final Field field, final Object value); static void writeField(final Object target, final String fieldName, final Object value); static Object readField(final Object target, final Field field); static Field getField(final Class<?> klass, String fieldName); static List<Field> getAllField(final Class<?> klass); static String genGetMethodName(Field field); static String genSetMethodName(Field field); static Field[] scanAllField(final Class<?> klass, List<Class<? extends Annotation>> annotations); static void injectionStaticField(Map<String, T> templates, Class<?> target, Function<T, String> fun); }
FieldUtils { public static List<Field> getAllField(final Class<?> klass) { List<Field> result = new ArrayList<>(); for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) { for (Field field : target.getDeclaredFields()) { result.add(field); } } return result; }  static void writeField(final Object target, final Field field, final Object value); static void writeField(final Object target, final String fieldName, final Object value); static Object readField(final Object target, final Field field); static Field getField(final Class<?> klass, String fieldName); static List<Field> getAllField(final Class<?> klass); static String genGetMethodName(Field field); static String genSetMethodName(Field field); static Field[] scanAllField(final Class<?> klass, List<Class<? extends Annotation>> annotations); static void injectionStaticField(Map<String, T> templates, Class<?> target, Function<T, String> fun);  }