private Function<String, String> resolveMappingFunction() {
        // Create a default mapping function that escapes closing comment
        // tokens if one was not explicitly configured.
        Function<String, String> function = mappingFunction;

        if (mappingFunction == null) {
            function = JavaStyleDocumentationWriterBuilder::escapeClosingChars;
        }

        // Always compose at-sign escaping with whatever function was resolved.
        if (escapeAtSignWithEntity) {
            function = function.andThen(JavaStyleDocumentationWriterBuilder::escapeAtSignWithEntity);
        }

        return function;
    }
");
            writer.setNewlinePrefix(" * ");
            runnable.run();
            writer.ensureNewline();
            writer.popState();
            writer.writeWithNoFormatting("
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/writer/JavaStyleDocumentationWriterBuilder.java