Code example for Field

Methods: setLong

0
    } 
 
    @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()));
      } 
    } 
 
    @Override 
    public void setFieldValueFloat(Object instance, float value) {
      try { 
        field.setFloat(instance, value);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    }