T
- The type of CodegenWriter
being written to.DocWriter
. This will be removed in a future release.@Deprecated
@FunctionalInterface
public interface DocumentationWriter<T extends CodeWriter>
Runnable
in invoked.
The following example shows how to implement a basic
DocumentationWriter
that encloses documentation in
successive lines that start with "///".
public final class MyDocWriter implements DocumentationWriter<MyWriter> {
\@Override
public void writeDocs(T writer, Runnable runnable) {
setNewlinePrefix("/// ")
runnable.run();
}
}
Modifier and Type | Method and Description |
---|---|
void |
writeDocs(T writer,
java.lang.Runnable runnable)
Deprecated.
Writes documentation comments.
|
void writeDocs(T writer, java.lang.Runnable runnable)
Implementations are expected to write out the beginning of a documentation
comment, set any necessary prefix for each line written while writing docs,
then invoke the given runnable
, then finally write the closing
characters for documentation.
writer
- Writer to configure for writing documentation.runnable
- Runnable that handles actually writing docs with the writer.