Code example for Field

Methods: setBoolean

0
    } 
 
    @Override 
    public void setFieldValueBoolean(Object instance, boolean value) {
      try { 
        field.setBoolean(instance, value);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    } 
 
    @Override 
    public void setFieldValueShort(Object instance, short value) {
      try { 
        field.setShort(instance, value);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    }