Class ExpressionTransformParseContext
- java.lang.Object
-
- com.inductiveautomation.perspective.gateway.expression.AbstractExpressionParseContext
-
- com.inductiveautomation.perspective.gateway.binding.expression.ExpressionBindingParseContext
-
- com.inductiveautomation.perspective.gateway.binding.transforms.expression.ExpressionTransformParseContext
-
- All Implemented Interfaces:
ExpressionParseContext
public class ExpressionTransformParseContext extends ExpressionBindingParseContext
AnExpressionBindingParseContext
which additionally wraps aConstantExpression
and aPredicate
which returns true if the path in the boundExpression
should delegate to the ConstantExpression. If the Predicate is false, this class will delegate toExpressionBindingParseContext.createBoundExpression(String)
. Also exposes a methodonValueChanged(QualifiedValue)
to update the underlying ConstantExpression's internalQualifiedValue
.
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.perspective.gateway.expression.AbstractExpressionParseContext
context, INITIAL_TAG_VALUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
createBoundExpression(java.lang.String path)
Returns an internalConstantExpression
if the injectedPredicate.test(Object)
returns true for the given path input.-
Methods inherited from class com.inductiveautomation.perspective.gateway.expression.AbstractExpressionParseContext
createExpressionForTagReference, getFunctionFactory
-
-
-
-
Method Detail
-
createBoundExpression
public Expression createBoundExpression(java.lang.String path) throws java.lang.RuntimeException
Returns an internalConstantExpression
if the injectedPredicate.test(Object)
returns true for the given path input. If the predicate returns false, this method delegates toExpressionBindingParseContext.createBoundExpression(String)
.- Specified by:
createBoundExpression
in interfaceExpressionParseContext
- Overrides:
createBoundExpression
in classExpressionBindingParseContext
- Parameters:
path
- the text content inside the braces.- Throws:
java.lang.RuntimeException
- because the CUP parser doesn't have a throws on the function that calls this inside the parser
-
-