Skip to content

Commit 31b2999

Browse files
Expose CodegenWriter's doc writer
When the doc writer is just an anonymous lambda function, it makes sense to hide it away in the parent implementation. But when it's a class that satisifies the interface, there may be additional things on it that the subclasses or callers will want to use. For example, a doc formatter.
1 parent 289c83c commit 31b2999

File tree

1 file changed

+9
-0
lines changed
  • smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/writer

1 file changed

+9
-0
lines changed

smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/writer/CodegenWriter.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ public CodegenWriter(DocumentationWriter<T> documentationWriter, U importContain
8585
this.importContainer = importContainer;
8686
}
8787

88+
/**
89+
* Gets the documentation writer.
90+
*
91+
* @return Returns the documentation writer.
92+
*/
93+
public final DocumentationWriter<T> getDocumentationWriter() {
94+
return documentationWriter;
95+
}
96+
8897
/**
8998
* Gets the import container associated with the writer.
9099
*

0 commit comments

Comments
 (0)