Class JavaStyleDocumentationWriterBuilder
java.lang.Object
software.amazon.smithy.codegen.core.writer.JavaStyleDocumentationWriterBuilder
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends CodeWriter>
DocumentationWriter<T>build()Deprecated.Creates aDocumentationWriterconfigured by the builder.escapeAtSignWithEntity(boolean escapeAtSignWithEntity) Deprecated.Sets whether or not the "@" sign is escaped with an HTML entity.static StringescapeAtSignWithEntity(String contents) Deprecated.A function used to escape the @ sign of a documentation comment with an HTML entity of @.static StringescapeClosingChars(String contents) Deprecated.A function used to escape the closing tokens of a documentation comment.mappingFunction(Function<String, String> mappingFunction) Deprecated.Sets a custom mapping function to use when filtering documentation.namedDocumentationSection(String namedDocumentationSection) Deprecated.Sets a specific named section to use when writing documentation.
-
Constructor Details
-
JavaStyleDocumentationWriterBuilder
public JavaStyleDocumentationWriterBuilder()Deprecated.
-
-
Method Details
-
escapeClosingChars
Deprecated.A function used to escape the closing tokens of a documentation comment.- Parameters:
contents- Contents to sanitize.- Returns:
- Returns the sanitized contents.
-
escapeAtSignWithEntity
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
Deprecated.Creates aDocumentationWriterconfigured 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
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 tonullto use the default.- Returns:
- Returns the builder.
-
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.
-