Class MustacheParser
- java.lang.Object
-
- org.pipservices3.expressions.mustache.parsers.MustacheParser
-
public class MustacheParser extends Object
-
-
Constructor Summary
Constructors Constructor Description MustacheParser()
-
Method Summary
Modifier and Type Method Description voidclear()Clears parsing results.List<MustacheToken>getInitialTokens()The list of original mustache tokens.List<Token>getOriginalTokens()List<MustacheToken>getResultTokens()The list of parsed mustache tokens.StringgetTemplate()The mustache template.List<String>getVariableNames()The list of found variable names.voidparseString(String mustache)Sets a new mustache string and parses it into internal byte code.voidparseTokens(List<Token> tokens)voidsetOriginalTokens(List<Token> value)voidsetTemplate(String value)The mustache template.
-
-
-
Method Detail
-
getTemplate
public String getTemplate()
The mustache template.
-
setTemplate
public void setTemplate(String value) throws Exception
The mustache template.- Throws:
Exception
-
setOriginalTokens
public void setOriginalTokens(List<Token> value) throws MustacheException
- Throws:
MustacheException
-
getInitialTokens
public List<MustacheToken> getInitialTokens()
The list of original mustache tokens.
-
getResultTokens
public List<MustacheToken> getResultTokens()
The list of parsed mustache tokens.
-
parseString
public void parseString(String mustache) throws Exception
Sets a new mustache string and parses it into internal byte code.- Parameters:
mustache- A new mustache string.- Throws:
Exception
-
parseTokens
public void parseTokens(List<Token> tokens) throws MustacheException
- Throws:
MustacheException
-
clear
public void clear()
Clears parsing results.
-
-