public static void addMethods( Class<?> c, MethodDepth depth )
    {
        switch (depth)
        {
        case DEFINED:
            for (Method m : c.getDeclaredMethods())
            {
                addMethod( m );
            }
            break;
        case PUBLIC_INHERITED:
            for (Method m : c.getMethods())
            {
                addMethod( m );
            }
            break;
        case ALL_INHERITED:
            for (Method m : c.getDeclaredMethods())
            {
                addMethod( m );
            }
            if (c.getSuperclass() != Object.class)
            {
                addMethods( c.getSuperclass(), depth );
            }
            break;
        }
    }