code: @SuppressWarnings("all")
    public static void setField(Object target, Field field, Object value) {
      try {
        Assert.isFalse(Modifier.isFinal(field.getModifiers()), new FieldAccessException(String.format(
          "Cannot set the value of a final field (%1$s) on %2$s type (%3$s)!", field.getName(),
            BooleanUtils.toString(target == null, "class", "object of"), field.getDeclaringClass().getName())));
  
        boolean currentAccessible = field.isAccessible();
  
        field.setAccessible(true);
        field.set(target, value);
        field.setAccessible(currentAccessible);
      }
      catch (FieldAccessException e) {
        throw e;
      }
      catch (NullPointerException e) {
        throw e;
      }
      catch (Exception e) {
        throw new FieldAccessException(String.format("Failed to set field (%1$s) to value (%2$s) on %3$s type (%4$s)!",
          field.getName(), value, BooleanUtils.toString(target == null, "class", "object of"),
            field.getDeclaringClass().getName()), e);
      }
    }
docs: Sets the field on the given object to the given value. If the "target" object is null, then this method assumes
  the field is a static (class) member field; otherwise the field is considered an instance (object) member field.
  This method is not null-safe!
  
  @param target the Object on which the field is defined.
  @param field the specified Field on which to set the value.
  @param value the Object value to set the specified field to.
  @throws FieldAccessException if the field is final, or the value for the specified field could not be set.
  @throws NullPointerException if the field parameter argument is null.