code: public static Object getFieldValue(final Object object, final Field field) throws IllegalAccessException {
          boolean access = field.isAccessible();
          field.setAccessible(true);
          Object value = field.get(object);
          field.setAccessible(access);
          return value;
      }
docs: Get the value (accessible or not accessible) of a field of a target object.
  
  @param object instance to get the field of
  @param field  field to get the value of
  @return the value of the field
  @throws IllegalAccessException if field can not be accessed