Class StringConstantReader
java.lang.Object
ch.andre601.expressionparser.parsers.ValueReader
ch.andre601.expressionparser.parsers.StringConstantReader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first Token in thelist of Tokens
and returns aConstantExpressionTemplate
whose String value is the one from the retrieved Token, if it is aStringToken
, elsenull
.
-
Constructor Details
-
StringConstantReader
public StringConstantReader()
-
-
Method Details
-
read
public ExpressionTemplate read(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first Token in thelist of Tokens
and returns aConstantExpressionTemplate
whose String value is the one from the retrieved Token, if it is aStringToken
, elsenull
.- Specified by:
read
in classValueReader
- Parameters:
parser
- ExpressionTemplateParser instance to use. The default ExpressionTemplateParser provides itself here.tokens
- List of tokens to parse into an ExpressionTemplate.collector
-ParseWarnCollector
instance to use.- Returns:
- Possibly-null
ExpressionTemplate
.
-