public abstract class Processor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Processor.ShortcodeProcessor
Specific process for snippet shortcode component.
|
static class |
Processor.WebComponentProcessor
Specific process for snippet web component.
|
Modifier and Type | Field and Description |
---|---|
protected SnippetParser |
parser |
Constructor and Description |
---|
Processor(SnippetParser parser)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
appendChildrenToHtml(org.jsoup.nodes.Node node,
Appendable writer)
Append child
Node in html rendering. |
protected String |
convertElementToHtml(org.jsoup.nodes.Element element)
Converts the snippet element to html format.
|
protected org.jsoup.nodes.Element |
convertToHtml(ComponentToken startToken,
ComponentToken endToken)
Convert the snippet to html.
|
protected SnippetComponent<?> |
createSnippetComponent(ComponentToken startToken,
ComponentToken endToken)
Create a
SnippetComponent . |
void |
parse(ComponentToken token)
Specific parsing for each
ComponentToken . |
protected final SnippetParser parser
public Processor(SnippetParser parser)
parser
- current parser.public void parse(ComponentToken token)
ComponentToken
.token
- the current token.protected abstract void appendChildrenToHtml(org.jsoup.nodes.Node node, Appendable writer) throws IOException
Node
in html rendering.node
- the node to use.writer
- the html writerIOException
- If an I/O error occurs.protected org.jsoup.nodes.Element convertToHtml(@Nonnull ComponentToken startToken, @Nullable ComponentToken endToken)
startToken
- the start tokenendToken
- the end token.Element
representing html represention of snippet.protected SnippetComponent<?> createSnippetComponent(ComponentToken startToken, ComponentToken endToken)
SnippetComponent
.startToken
- the start token.endToken
- the end token.SnippetComponent
representing the information contained between
startToken
and endToken
.Copyright © 2012–2023 Friederich Christophe. All rights reserved.