src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java
protected void setFieldValue(String value) {
      try {
         // filter property value
         value = filterValue(value);

         // coerce value to field type
         Class<?> type = fieldInstance.getField().getType();
         PropertyEditor editor = PropertyEditors.findEditor(type);
         editor.setAsText(value);
         Object coerced = editor.getValue();

         // bind value to field
         fieldInstance.set(coerced);
      }
      catch (IllegalAccessException e) {
         throw new PropertyException(e);
      }
   }
protected void setFieldValue(String value) {
      try {
         // filter property value
         value = filterValue(value);

         // coerce value to field type
         Class<?> type = fieldInstance.getField().getType();
         PropertyEditor editor = PropertyEditors.findEditor(type);
         editor.setAsText(value);
         Object coerced = editor.getValue();

         // bind value to field
         fieldInstance.set(coerced);
      }
      catch (IllegalAccessException e) {
         throw new PropertyException(e);
      }
   }
protected void setFieldValue ( String value ) { try { // filter property value value = filterValue ( value ) ; // coerce value to field type Class < ? > type = fieldInstance . getField ( ) . getType ( ) ; PropertyEditor editor = PropertyEditors . findEditor ( type ) ; editor . setAsText ( value ) ; Object coerced = editor . getValue ( ) ; // bind value to field fieldInstance . set ( coerced ) ; } catch ( IllegalAccessException e ) { throw new PropertyException ( e ) ; } }
Coerce and set specified value to field.

@param value   Field value.

@throws PropertyException     Failed to set field value.
Coerce and set specified value to field .