Get all methods in Java
1. Use reflection to get all methods in Java
public static void main(String args[]) {
        try {
            Class c = GetMethod.class;
            Method[] m = c.getDeclaredMethods();
            for (int i = 0; i < m.length; i++)
                System.out.println(m[i].toString());
        } catch (Throwable e) {
            System.err.println(e);
        }
    }