code: public static MethodHandle findWriteMethodHandle(Field field) {
      ConstructorMetadata constructorMetadata = ConstructorIntrospector
          .introspect(field.getDeclaringClass());
      Class<?> containerClass;
      MethodHandle mh = null;
      if (constructorMetadata.isBuilderConstructionStrategy()) {
        containerClass = constructorMetadata.getBuilderClass();
        for (String prefix : WRITE_METHOD_PREFIXES) {
          mh = findInstanceMethod(containerClass, getWriteMethodName(field, prefix), null,
              field.getType());
          if (mh != null) {
            break;
          }
        }
      } else {
        containerClass = field.getDeclaringClass();
        mh = findInstanceMethod(containerClass, getWriteMethodName(field), null, field.getType());
      }
      if (mh == null) {
        String pattern = "Class %s requires a public mutator method for field %s";
        throw new NoMutatorMethodException(
            String.format(pattern, containerClass.getName(), field.getName()));
      }
      return mh;
    }
docs: Finds and returns a {@link MethodHandle} that can be used to update a field represented by the
  given metadata.
  
  @param field
  the field
  
  @return the {@link MethodHandle} to update the field
  @throws NoMutatorMethodException
  if no matching method exists