private static Method[] getDeclaredMethods( final Class<?> type )
    {
        return AccessController.doPrivileged( new PrivilegedAction<Method[]>()
        {
            public Method[] run()
            {
                final Method[] declaredMethods = type.getDeclaredMethods();
                AccessibleObject.setAccessible( declaredMethods, true );
                return declaredMethods;
            }
        } );
    }