public abstract class DocumentationWriter extends PrintWriter
PrintWriter that provides additional methods which are useful for producing
API documentation.| Modifier and Type | Class and Description |
|---|---|
static interface |
DocumentationWriter.DocumentationAction
Encapsulates an action that outputs some documentation.
|
static interface |
DocumentationWriter.TableAction
Encapsulates an action that outputs a table.
|
static interface |
DocumentationWriter.TableWriter
A writer for producing a table
|
out| Modifier | Constructor and Description |
|---|---|
protected |
DocumentationWriter(Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
codeBlock(String language,
DocumentationWriter.DocumentationAction action)
Calls the given
action to document a code block. |
abstract void |
shellCommand(DocumentationWriter.DocumentationAction action)
Calls the given
action to document a shell command. |
abstract void |
table(DocumentationWriter.TableAction action)
Calls the given
action to document a table. |
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, writeprotected DocumentationWriter(Writer writer)
public abstract void shellCommand(DocumentationWriter.DocumentationAction action) throws IOException
action to document a shell command. Any prefix necessary
for the documentation format is written prior to calling the action. Having
called the action, any necessary suffix is then written.action - the action that will produce the shell commandIOException - if the documentation failspublic abstract void codeBlock(String language, DocumentationWriter.DocumentationAction action) throws IOException
action to document a code block. The code block will be
annotated as containing code written in the given language. Any prefix
necessary for the documentation format is written prior to calling the
action. Having called the action, any necessary suffix is then
written.language - the language in which the code is writtenaction - the action that will produce the codeIOException - if the documentation failspublic abstract void table(DocumentationWriter.TableAction action) throws IOException
action to document a table. Any prefix necessary for
documenting a table is written prior to calling the action. Having called
the action, any necessary suffix is then written.action - the action that will produce the tableIOException - if the documentation fails