Interface DocWriter<T extends AbstractCodeWriter<T>>
-
- Type Parameters:
T- The type ofAbstractCodeWriterbeing written to.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @Deprecated public interface DocWriter<T extends AbstractCodeWriter<T>>Deprecated.This class is deprecated and will be removed in a future release.
Use
SymbolWriterdirectly instead. Responsible for properly writing documentation emitted when aRunnablein invoked.The following example shows how to implement a basic
DocumentationWriterthat 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(); } }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidwriteDocs(T writer, java.lang.Runnable runnable)Deprecated.Writes documentation comments.
-
-
-
Method Detail
-
writeDocs
void writeDocs(T writer, java.lang.Runnable runnable)
Deprecated.Writes documentation comments.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.- Parameters:
writer- Writer to configure for writing documentation.runnable- Runnable that handles actually writing docs with the writer.
-
-