code: public static void setField(Class<?> targetClass, Object target, String field, Object value) {
          try {
              Field classField = targetClass.getDeclaredField(field);
  
              AccessController.doPrivileged(
                      new SetFieldPrivilegedAction(classField, target, value));
  
          } catch (NoSuchFieldException e) {
              throw new TransfuseInjectionException(
                      "NoSuchFieldException Exception during field injection: " + field + " in " + target.getClass(), e);
          } catch (PrivilegedActionException e) {
              throw new TransfuseInjectionException("PrivilegedActionException Exception during field injection", e);
          } catch (Exception e) {
              throw new TransfuseInjectionException("Exception during field injection", e);
          }
      }
docs: Updates field with the given value.
  
  @param targetClass class representing the object containing the field.
  @param target object containing the field to update
  @param field name of the field
  @param value object to update the field to