Package com.illumon.iris.db.tables.utils
Class ExpressionParser<TYPE>
java.lang.Object
com.illumon.iris.db.tables.utils.ExpressionParser<TYPE>
- Type Parameters:
TYPE- The expected type of the parsed expression
A parser that will try a set of
ExpressionFactorys and attempt to parse the expression until one of them succeeds.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempt to process the expression using theconfiguredfactoriesvoidregisterFactory(ExpressionFactory<TYPE> expressionFactory) Add an expression factory to the list of possible parsers for an expression.
-
Constructor Details
-
ExpressionParser
public ExpressionParser()
-
-
Method Details
-
parse
Attempt to process the expression using theconfiguredfactories- Parameters:
expression- the expression to parse- Returns:
- The result of the parsing
- Throws:
ExpressionException- if there is a problem parsing the expression, or no parsers accepted the expression.
-
registerFactory
Add an expression factory to the list of possible parsers for an expression.- Parameters:
expressionFactory- the factory
-