Class StringParser
java.lang.Object
com.inductiveautomation.ignition.common.expressions.parsing.StringParser
- All Implemented Interfaces:
- Parser
This parser handles a literal string which contains references. The resulting
 expression will produce the string values
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumprotected static class
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedStringParser(Class<? extends AbstractExpression> exprType) This constructor specifies what type of expression should be created.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddPart(List<StringParser.StringOrPath> parts, StringParser.StringOrPath newPart) static StringParserReturns a parser that expects to parse sql queries for referencesstatic StringParserReturns a parser who creates expressions that simply toString sub-expressions, adjusting the values for the locale.static StringParserReturns a parser who creates an expression that is the toString of all of the sub-expressions, but with no consideration of the locale.parse(String expr, ExpressionParseContext binder) protected StringParser.StringOrPath[]parseQueryWithBoundPaths(String query) protected StringParser.StringOrPath[]protected static StringParser.StringOrPath[]protected StringParser.StringOrPath[]Chops up a query, returning the string segments and path segments separatelyvoidpreventToStringSingleExpression(boolean prevent) If set to true and the parsed expression only contains one expression.voidsetAllowsReferenceEscape(boolean escapeReference) If true, allows item reference syntax, such as "{blah}" to be escaped with "\", to avoid expansion.voidsetEscapeStrategy(StringParser.EscapeStrategy strategy) 
- 
Field Details- 
ESCAPE- See Also:
 
- 
OPEN_DELIM- See Also:
 
- 
CLOSE_DELIM- See Also:
 
 
- 
- 
Constructor Details- 
StringParserpublic StringParser()
- 
StringParserThis constructor specifies what type of expression should be created. Different expressions will behave differently.
 
- 
- 
Method Details- 
newStandardParser_LocalizedReturns a parser who creates expressions that simply toString sub-expressions, adjusting the values for the locale.
- 
newStandardParser_NonLocalizedReturns a parser who creates an expression that is the toString of all of the sub-expressions, but with no consideration of the locale.
- 
newQueryParserReturns a parser that expects to parse sql queries for references
- 
setAllowsReferenceEscapepublic void setAllowsReferenceEscape(boolean escapeReference) If true, allows item reference syntax, such as "{blah}" to be escaped with "\", to avoid expansion. False, usesStringParser.EscapeStrategy.NONETrue, usesStringParser.EscapeStrategy.REFERENCE
- 
setEscapeStrategy
- 
getAllowsReferenceEscape
- 
preventToStringSingleExpressionpublic void preventToStringSingleExpression(boolean prevent) If set to true and the parsed expression only contains one expression. The direct result of that expression will not be wrapped with a toString expression.
- 
parse
- 
addPart
- 
parseQueryWithBoundPaths- Throws:
- Exception
 
- 
parseQueryWithBoundPathsEscapedCharacters
- 
parseQueryWithEscapedBoundPathsprotected StringParser.StringOrPath[] parseQueryWithEscapedBoundPaths(String query) throws Exception Chops up a query, returning the string segments and path segments separately- Throws:
- Exception
 
- 
parseQueryWithBoundPathsNoEscapeprotected static StringParser.StringOrPath[] parseQueryWithBoundPathsNoEscape(String query) throws Exception - Throws:
- Exception
 
 
-