public static void setter ( Object instance , Field field , Object value ) { boolean forceAccess = false ; try { if ( ! field . isAccessible ( ) ) { forceAccess = true ; field . setAccessible ( true ) ; } field . set ( instance , value ) ; } catch ( IllegalAccessException ex ) { throw new ReflectionException ( ex ) ; } finally { if ( forceAccess ) { field . setAccessible ( false ) ; } } }
Set value of given field on given instance .