private MethodSpec createMethod(
          String methodName, TypeMirror type, Supplier<CodeBlock> methodBody) {
        return methodBuilder(methodName)
            .addModifiers(PRIVATE, STATIC)
            .returns(ClassName.get(String.class))
            .addParameter(TypeName.get(type), "value")
            .addParameter(TypeName.INT, "indentLevel")
            .beginControlFlow("if (value == null)")
            .addStatement("return $S", "null")
            .endControlFlow()
            .addCode(methodBody.get())
            .build();
      }
Parameter object to simplify the branches of {@link #format(CodeBlock, CodeBlock,
TypeMirror)} that call a delegate method.
value/src/main/java/com/google/auto/value/extension/toprettystring/processor/ToPrettyStringExtension.java