Right now I have
private static void getMethods(Class<? extends Object> clazz) {
Method[] declaredMethods = clazz.getDeclaredMethods();
for (Method aMethod : declaredMethods) {
aMethod.setAccessible(true);
// Print the declaration
System.out.print(Modifier.toString(aMethod.getModifiers()) + " "
+ aMethod.getReturnType().getSimpleName() + " " + aMethod.getName());
// Get Parameter Types
getParameters(aMethod);
//Empty Body
System.out.println("{}\n");
}
}
Which prints most information reflectively but creates an empty body. How do I add to the reflective nature of Java to print the method body?