| Modifier and Type | Class and Description |
|---|---|
| public static class | TextContentRenderer.
Builder for configuring a |
| private class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TextContentRenderer. | |
| public void | render(Node node, Appendable output)
Implements jdk. Render the tree of nodes to output. |
| public String | render(Node node)
Implements jdk. Render the tree of nodes to string. |
| nodeRendererFactories | back to summary |
|---|---|
| private final List<TextContentNodeRendererFactory> nodeRendererFactories | |
| stripNewlines | back to summary |
|---|---|
| private final boolean stripNewlines | |
| TextContentRenderer | back to summary |
|---|---|
| private TextContentRenderer(TextContentRenderer. | |
| builder | back to summary |
|---|---|
| public static TextContentRenderer. Create a new builder for configuring a
| |
| render | back to summary |
|---|---|
| public void render(Node node, Appendable output) Implements jdk. Doc from jdk. Render the tree of nodes to output.
| |
| render | back to summary |
|---|---|
| public String render(Node node) Implements jdk. Doc from jdk. Render the tree of nodes to string.
| |
TextContentRenderer. See methods for default configuration.
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public TextContentRenderer | |
| public TextContentRenderer. | extensions(Iterable<? extends Extension>
extensions to use on this text content renderer extensions)Returns: |
| public TextContentRenderer. | Returns: thisthe factory for creating a node renderer nodeRendererFactory)Add a factory for instantiating a node renderer (done when rendering). |
| public TextContentRenderer. | Returns: thistrue for stripping new lines and render text as "single line",
false for keeping all line breaks stripNewlines)Set the value of flag for stripping new lines. |
| nodeRendererFactories | back to summary |
|---|---|
| private List<TextContentNodeRendererFactory> nodeRendererFactories | |
| stripNewlines | back to summary |
|---|---|
| private boolean stripNewlines | |
| Builder | back to summary |
|---|---|
| public Builder() | |
| build | back to summary |
|---|---|
public TextContentRenderer build()
| |
| extensions | back to summary |
|---|---|
public TextContentRenderer.
| |
| nodeRendererFactory | back to summary |
|---|---|
| public TextContentRenderer. Add a factory for instantiating a node renderer (done when rendering). This allows to override the rendering of node types or define rendering for custom node types. If multiple node renderers for the same node type are created, the one from the factory that was added first "wins". (This is how the rendering for core node types can be overridden; the default rendering comes last.)
| |
| stripNewlines | back to summary |
|---|---|
| public TextContentRenderer. Set the value of flag for stripping new lines.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final NodeRendererMap | |
| private final TextContentWriter |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TextContentWriter | |
| public void | render(Node node)
Implements jdk. Render the specified node and its children using the configured renderers. |
| public boolean |
| nodeRendererMap | back to summary |
|---|---|
| private final NodeRendererMap nodeRendererMap | |
| textContentWriter | back to summary |
|---|---|
| private final TextContentWriter textContentWriter | |
| RendererContext | back to summary |
|---|---|
| private RendererContext(TextContentWriter textContentWriter) | |
| getWriter | back to summary |
|---|---|
| public TextContentWriter getWriter() Implements jdk.
| |
| render | back to summary |
|---|---|
| public void render(Node node) Implements jdk. Doc from jdk. Render the specified node and its children using the configured renderers. This should be used to render child nodes; be careful not to pass the node that is being rendered, that would result in an endless loop.
| |
| stripNewlines | back to summary |
|---|---|
| public boolean stripNewlines() Implements jdk.
| |
TextContentRenderer.
| Modifier and Type | Method and Description |
|---|---|
| public void |
| extend | back to summary |
|---|---|
| public void extend(TextContentRenderer. | |