Code example for Field

Methods: getBoolean

0
    } 
 
    @Override 
    public boolean getFieldValueBoolean(Object instance) {
      try { 
        return field.getBoolean(instance);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    } 
 
    @Override 
    public short getFieldValueShort(Object instance) {
      try { 
        return field.getShort(instance);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(
            format("cannot access %s field", instance.getClass()));
      } 
    }