Code example for Field

Methods: setInt

0
    } 
 
    @Override 
    public void setFieldValueInt(Object instance, int value) {
      try { 
        field.setInt(instance, value);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    } 
 
    @Override 
    public void setFieldValueLong(Object instance, long value) {
      try { 
        field.setLong(instance, value);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    }