static Field getDeclaredField ( final Class < ? > c , final String name ) throws NoSuchFieldException { if ( System . getSecurityManager ( ) == null ) return c . getDeclaredField ( name ) ; Field result = AccessController . doPrivileged ( new PrivilegedAction < Field > ( ) { public Field run ( ) { try { return c . getDeclaredField ( name ) ; } catch ( NoSuchFieldException e ) { return null ; } } } ) ; if ( result != null ) return result ; throw new NoSuchFieldException ( ) ; }
Get the declared field