public abstract class AbstractParser extends Object
AbstractNodes from them. AbstractParser keep information about regular expression that should be
used to search for these special parts of text and contain mechanism how to create node from them.| Modifier and Type | Field and Description |
|---|---|
protected String |
end
expression used to find closing tag
|
protected String |
name
parser name, this name should be given to created node
|
protected String |
start
expression used to find starting tag
|
| Constructor and Description |
|---|
AbstractParser() |
AbstractParser(String name,
String start,
String end)
Constructor for
AbstractParser |
| Modifier and Type | Method and Description |
|---|---|
abstract AbstractNode |
createNode(String start,
String end,
String text,
Translator translator)
Create
AbstractNode instance from a given text |
String |
getEnd() |
abstract String |
getEndExpression(String start) |
String |
getName() |
String |
getStart() |
abstract String |
getStartEndExpression() |
abstract String |
getStartExpression() |
void |
setEnd(String end) |
void |
setName(String name) |
void |
setStart(String start) |
protected String start
protected String end
protected String name
public AbstractParser()
public AbstractParser(String name, String start, String end)
AbstractParsername - parser namestart - regular expression that would be used to find beginning of text from which node has to be createdend - regular expression that would be used to find end of text from which node has to be createdpublic String getEnd()
public void setEnd(String end)
end - the end to setpublic String getStart()
public void setStart(String start)
start - the start to setpublic String getName()
public void setName(String name)
name - the name to setpublic abstract String getStartExpression()
public abstract String getStartEndExpression()
public abstract String getEndExpression(String start)
public abstract AbstractNode createNode(String start, String end, String text, Translator translator)
AbstractNode instance from a given textstart - is a String that was found when searching for a start of text that should be used to create nodeend - is a String that was found when searching for a end of text that should be used to create nodetext - text is whole text that was between start and end Stringstranslator - reference to Translator that would be used to search for sub tags in given texttext)Copyright © 2017 SAP SE. All Rights Reserved.