code: public static Object getFieldValue(final Object object, final Field field) {
          try {
              if (!field.isAccessible()) {
                  field.setAccessible(true);
              }
  
              return field.get(object);
          } catch (final Exception e) {
              throw new IllegalArgumentException("Could not get field value: " + field, e);
          }
      }
docs: Get the value of a given field on a given object via reflection.
  
  @param object
  -- target object of field access
  @param field
  -- target field
  @return -- the value of the represented field in object; primitive values
  are wrapped in an appropriate object before being returned