Ouput the values of the "get" methods.
final String PREFIX = "get"; //$NON-NLS-1$
System.out.println("--- Accessing Get Methods ---");
Method[] meths = obj.getClass()
.getMethods();
for (int idx = 0; idx < meths.length; idx++) {
if (meths[idx].getName()
.startsWith(PREFIX)) {
if (meths[idx].getParameterTypes().length == 0) {
System.out.print(meths[idx].getName() + " = "); //$NON-NLS-1$
System.out.println(meths[idx].invoke(obj, null));
}
}
}