Class JavaStyleDocumentationWriterBuilder

java.lang.Object
software.amazon.smithy.codegen.core.writer.JavaStyleDocumentationWriterBuilder

@Deprecated public final class JavaStyleDocumentationWriterBuilder extends Object
Deprecated.
this class uses CodeWriter, which is deprecated.
A builder used to create a DocumentationWriter for Java style documentation comments.

Documentation comments are automatically sanitized by escaping a closing documentation comment (i.e., star (*) followed by a forward slash (/)). This should also work for JavaScript, PHP, and other languages that use Java-style comments.

  • Constructor Details

    • JavaStyleDocumentationWriterBuilder

      public JavaStyleDocumentationWriterBuilder()
      Deprecated.
  • Method Details

    • escapeClosingChars

      public static String escapeClosingChars(String contents)
      Deprecated.
      A function used to escape the closing tokens of a documentation comment.
      Parameters:
      contents - Contents to sanitize.
      Returns:
      Returns the sanitized contents.
    • escapeAtSignWithEntity

      public static String escapeAtSignWithEntity(String contents)
      Deprecated.
      A function used to escape the @ sign of a documentation comment with an HTML entity of @.
      Parameters:
      contents - Contents to sanitize.
      Returns:
      Returns the sanitized contents.
    • build

      public <T extends CodeWriter> DocumentationWriter<T> build()
      Deprecated.
      Creates a DocumentationWriter configured by the builder.
      Type Parameters:
      T - The type of writer to create.
      Returns:
      Returns the created documentation writer.
    • namedDocumentationSection

      public JavaStyleDocumentationWriterBuilder namedDocumentationSection(String namedDocumentationSection)
      Deprecated.
      Sets a specific named section to use when writing documentation.
      Parameters:
      namedDocumentationSection - The name of the state's section to use.
      Returns:
      Returns the builder.
    • mappingFunction

      public JavaStyleDocumentationWriterBuilder mappingFunction(Function<String,String> mappingFunction)
      Deprecated.
      Sets a custom mapping function to use when filtering documentation.

      Setting a custom mapping function will disable the default mapping function that is used to escape the closing tokens of a block comment. However, other mapping functions will still compose with a custom mapping function if provided (e.g., escaping @ symbols via escapeAtSignWithEntity(boolean) still compose with a custom mapping function).

      Parameters:
      mappingFunction - Mapping function to use. Set to null to use the default.
      Returns:
      Returns the builder.
    • escapeAtSignWithEntity

      public JavaStyleDocumentationWriterBuilder escapeAtSignWithEntity(boolean escapeAtSignWithEntity)
      Deprecated.
      Sets whether or not the "@" sign is escaped with an HTML entity.

      At signs are not escaped by default.

      Parameters:
      escapeAtSignWithEntity - Set to true to escape, false to not.
      Returns:
      Returns the builder.