### Question:
ReflectionUtil { public static List<Field> getAllFields(Class typeClass) { Objects.requireNonNull(typeClass, "Class is required"); List<Field> fields = new ArrayList<>(); if (typeClass.getSuperclass() != null) { fields.addAll(getAllFields(typeClass.getSuperclass())); } for (Field field : typeClass.getDeclaredFields()) { if (Modifier.isStatic(field.getModifiers()) == false && Modifier.isFinal(field.getModifiers()) == false) { fields.add(field); } } return fields; }  static boolean isComplexClass(Class fieldClass); static boolean isCollectionClass(Class checkClass); static List<Field> getAllFields(Class typeClass); static boolean isSubLookupEntity(Class entityClass); static boolean isSubClass(String className, Class entityClass); static boolean isFieldsDifferent(Object original, Object newField); static int compareObjects(T origin, T other); static Field getField(Object entity, String fieldName); static final String LOOKUP_ENTITY; static final String BASECOMPONENT_ENTITY; static final String COMPOSITE_KEY_SEPERATOR; static final String COMPOSITE_KEY_REPLACER; }### Answer:
@Test public void testGetAllFields() { System.out.println("getAllFields"); List<Field> result = ReflectionUtil.getAllFields(TestModel.class); System.out.println("Use Type Fields: "); for (Field field : result) { System.out.println(field.getName()); } }