public void set ( Object object , Object value ) throws IllegalAccessException , IllegalArgumentException { if ( null != setter ) { try { setter . invoke ( object , value ) ; } catch ( InvocationTargetException ite ) { if ( ite . getCause ( ) instanceof RuntimeException && ! ( ite . getCause ( ) instanceof JTransfoException ) ) { throw ( RuntimeException ) ite . getCause ( ) ; } throw new JTransfoException ( String . format ( GET_SET_ITO , setter . getName ( ) , object . getClass ( ) . getName ( ) , setter . getDeclaringClass ( ) . getName ( ) , ite . getCause ( ) . getMessage ( ) ) , ite . getCause ( ) ) ; } } else { if ( ! setUsingFieldLogged ) { log . warn ( "Cannot find setter (not public, wrong name or wrong type), " + "using field to access field {} of {}." , name , field . getType ( ) . getName ( ) ) ; setUsingFieldLogged = true ; } field . set ( object , value ) ; } }
Set field value .