@ Override public void writeToObject ( Object object ) { try { Method method = BeanUtils . getWriteMethod ( object . getClass ( ) , getName ( ) ) ; if ( method != null ) { method . invoke ( object , new Object [ ] { getValue ( ) } ) ; } } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalArgumentException e ) { throw new RuntimeException ( e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( e ) ; } }
Writes the value of the Property to the given object . It uses reflection and looks for a method starting with set followed by the capitalized Property name and with one parameter with the same type as the Property .