public class AsciidoctorWriter extends DocumentationWriter
DocumentationWriter
that produces output in Asciidoctor.DocumentationWriter.DocumentationAction, DocumentationWriter.TableAction, DocumentationWriter.TableWriter
out
Constructor and Description |
---|
AsciidoctorWriter(Writer writer)
Creates a new
AsciidoctorWriter that will write to the given writer |
Modifier and Type | Method and Description |
---|---|
void |
codeBlock(String language,
DocumentationWriter.DocumentationAction action)
Calls the given
action to document a code block. |
void |
shellCommand(DocumentationWriter.DocumentationAction action)
Calls the given
action to document a shell command. |
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, write
public AsciidoctorWriter(Writer writer)
AsciidoctorWriter
that will write to the given writer
writer
- The writer to which output will be writtenpublic void shellCommand(DocumentationWriter.DocumentationAction action) throws IOException
DocumentationWriter
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.shellCommand
in class DocumentationWriter
action
- the action that will produce the shell commandIOException
- if the documentation failspublic void codeBlock(String language, DocumentationWriter.DocumentationAction action) throws IOException
DocumentationWriter
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.codeBlock
in class DocumentationWriter
language
- the language in which the code is writtenaction
- the action that will produce the codeIOException
- if the documentation failspublic void table(DocumentationWriter.TableAction action) throws IOException
DocumentationWriter
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.table
in class DocumentationWriter
action
- the action that will produce the tableIOException
- if the documentation fails