import java.util.Arrays;
import javax.swing.JTable;
public class Main {
public static void main(final String[] args) {
printMemberClasses(JTable.class);
}
public static void printMemberClasses(final Class dataType) {
final Class[] nestedClasses = dataType.getClasses();
final Class[] declaredNestedClasses = dataType.getDeclaredClasses();
final Class[] nestedInterfaces = dataType.getInterfaces();
final Class declaringClass = dataType.getDeclaringClass();
System.out.println("Member Class infor for: " + dataType.getName());
System.out.println("Nested Classes: " + Arrays.asList(nestedClasses));
System.out.println("Declared Nested Classes: " + Arrays.asList(declaredNestedClasses));
System.out.println("Interfaces: " + Arrays.asList(nestedInterfaces));
System.out.println("Declaring Class: " + declaringClass);
}
}
|