public void writeToObject(Object object){
  try {
    Method method=BeanUtils.getWriteMethod(object.getClass(),getName(),getType());
    if (method != null) {
      method.invoke(object,new Object[]{getValue()});
    }
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

public void writeToObject ( Object object ) { try { Method method = BeanUtils . getWriteMethod ( object . getClass ( ) , getName ( ) , getType ( ) ) ; if ( method != null ) { method . invoke ( object , new Object [ ] { getValue ( ) } ) ; } } catch ( Exception 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 .
