I grabbed this piece of code:
ClassABC abc = new ClassABC();
for (Field field : abc.getClass().getDeclaredFields()) {
field.setAccessible(true);
String name = field.getName();
Object value = field.get(abc);
System.out.printf("Field name: %s, Field value: %s%n", name, value);
}
However I want something to that will grab the attributes from the live object rather than the Class. I know I need introspection I'm just not sure how to grab from the live object.