Class DocumentationBuilder
java.lang.Object
software.amazon.awssdk.codegen.docs.DocumentationBuilder
Builder for a Javadoc string that orders sections consistently.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasyncThrows(String exceptionClass, String exceptionDoc) Async exceptions are not thrown from the method, rather the returnedCompletableFutureis completed exceptionally (CompletableFuture.completeExceptionally(Throwable).asyncThrows(List<Pair<String, String>> exceptions) Adds multiple async throws to the Javadoc for each exception name / exception doc pair.asyncThrows(Pair<String, String>... exceptions) Adds multiple async throws to the Javadoc for each exception name / exception doc pair.build()Builds the Javadoc string with the current configuration.description(String docs) Description of javaodc comment.Adds a new param to the Javadoc.Adds a new param to the Javadoc.Adds documentation for return value.Adds documentation for return value.Adds a @see reference to the Javadocs.Adds a @see reference to the Javadocs.syncThrows(String exceptionClass, String exceptionDoc) Adds a throws tag to the Javadoc.syncThrows(List<Pair<String, String>> exceptions) Adds multiple throws tag to the Javadoc for each exception name / exception doc pair.syncThrows(Pair<String, String>... exceptions) Adds multiple throws tag to the Javadoc for each exception name / exception doc pair.Adds an arbitrary tag with values to the Javadoc.
-
Constructor Details
-
DocumentationBuilder
public DocumentationBuilder()
-
-
Method Details
-
description
Description of javaodc comment. I.E. what you are reading right now.- Parameters:
docs- Description string- Returns:
- This builder for method chaining.
-
param
Adds a new param to the Javadoc.- Parameters:
paramName- Name of parameter.paramDocs- Documentation for parameter.- Returns:
- This builder for method chaining.
-
param
Adds a new param to the Javadoc. UsesString.format(String, Object...)using the given arguments.- Parameters:
paramName- Name of parameter.paramDocs- Documentation for parameter.formatArgs- Arguments referenced by format specifiers.- Returns:
- This builder for method chaining.
-
returns
Adds documentation for return value. If not set then no return tag will be added to the Javadoc string.- Parameters:
returnsDoc- Documentation for return value (if present).- Returns:
- This builder for method chaining.
-
returns
Adds documentation for return value. If not set then no return tag will be added to the Javadoc string. UsesString.format(String, Object...)using the given arguments.- Parameters:
returnsDoc- Documentation for return value (if present).formatArgs- Arguments referenced by format specifiers.- Returns:
- This builder for method chaining.
-
asyncThrows
Async exceptions are not thrown from the method, rather the returnedCompletableFutureis completed exceptionally (CompletableFuture.completeExceptionally(Throwable). Because of this we don't add @throws to the Javadocs or method signature for async methods, we instead add a list of exceptions the future may be completed exceptionally with in the @returns section of the Javadoc.- Parameters:
exceptionClass- Class name of thrown exception.exceptionDoc- Documentation for thrown exception.- Returns:
- This builder for method chaining.
-
asyncThrows
Adds multiple async throws to the Javadoc for each exception name / exception doc pair.- Parameters:
exceptions- Multiple pairs of exception name to exception documentation.- Returns:
- This builder for method chaining.
- See Also:
-
asyncThrows
Adds multiple async throws to the Javadoc for each exception name / exception doc pair.- Parameters:
exceptions- Multiple pairs of exception name to exception documentation.- Returns:
- This builder for method chaining.
- See Also:
-
syncThrows
Adds a throws tag to the Javadoc.- Parameters:
exceptionClass- Class name of thrown exception.exceptionDoc- Documentation for thrown exception.- Returns:
- This builder for method chaining.
-
syncThrows
Adds multiple throws tag to the Javadoc for each exception name / exception doc pair.- Parameters:
exceptions- Multiple pairs of exception name to exception documentation.- Returns:
- This builder for method chaining.
- See Also:
-
syncThrows
Adds multiple throws tag to the Javadoc for each exception name / exception doc pair.- Parameters:
exceptions- Multiple pairs of exception name to exception documentation.- Returns:
- This builder for method chaining.
- See Also:
-
tag
Adds an arbitrary tag with values to the Javadoc. This will be added in between the throws and see sections of the Javadoc.- Parameters:
tagName- Name of tag to add.tagValues- List of values associated with the same.- Returns:
- This builder for method chaining.
-
see
Adds a @see reference to the Javadocs.- Parameters:
seeLink- Reference for @see.- Returns:
- This builder for method chaining.
-
see
Adds a @see reference to the Javadocs. UsesString.format(String, Object...)using the given arguments.- Parameters:
seeLink- Reference for @see.formatArgs- Arguments referenced by format specifiers.- Returns:
- This builder for method chaining.
-
build
Builds the Javadoc string with the current configuration.- Returns:
- Formatted Javadoc string.
-