Class AbstractMultiLevelExpressionParseContext
java.lang.Object
com.inductiveautomation.ignition.gateway.expressions.AbstractMultiLevelExpressionParseContext
- All Implemented Interfaces:
ExpressionParseContext
- Direct Known Subclasses:
AlarmEventCollectionExpressionParseContext
,BeanStyleExpressionParseContext
,PropertyBasedExpressionParseContext
,ReportDataExpressionParseContext
,SubqueryExpressionParseContext
public abstract class AbstractMultiLevelExpressionParseContext
extends Object
implements ExpressionParseContext
The foundation for an expression parse context that tries to create a reference, but then delegates if the reference
isn't the type expected. Implemented in this way because ultimately a RuntimeException should be thrown if the
reference can't be built. So, this implementation may not throw an error, but eventually one of the contexts up the
chain will.
By default the base's function factory is used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBoundExpression
(String path) Called to create expressions to represent bound elements, like:protected FunctionFactory
Sub classes do some strange things, this lets them get the base function factoryprotected ExpressionParseContext
Returns the parse context that this one delegates to on failure to create a bound expressionprotected abstract Expression
This function should create the expression if possible.
-
Constructor Details
-
AbstractMultiLevelExpressionParseContext
-
-
Method Details
-
getDelegateParseContext
Returns the parse context that this one delegates to on failure to create a bound expression -
getFunctionFactory
- Specified by:
getFunctionFactory
in interfaceExpressionParseContext
-
getBaseFunctionFactory
Sub classes do some strange things, this lets them get the base function factory -
createBoundExpression
Description copied from interface:ExpressionParseContext
Called to create expressions to represent bound elements, like:{ path.to.something }
- Specified by:
createBoundExpression
in interfaceExpressionParseContext
- Parameters:
path
- the text content inside the braces.- Throws:
RuntimeException
- because the CUP parser doesn't have a throws on the function that calls this inside the parser
-
tryCreateBoundExpression
This function should create the expression if possible. If not, it should return null instead of throwing the error, in which case the parent parse context will be tried.
-