Java tutorial
//package com.java2s; public class Main { public static void printAllInform(Class clsShow) { try { int i; for (i = 0; i < clsShow.getMethods().length; i++) { } for (i = 0; i < clsShow.getFields().length; i++) { } } catch (SecurityException e) { e.printStackTrace(); } catch (IllegalArgumentException e2) { e2.printStackTrace(); } catch (Exception e3) { e3.printStackTrace(); } } }