Package org.camunda.bpm.engine.impl.juel
Interface ExpressionNode
-
- All Superinterfaces:
Node
- All Known Implementing Classes:
AstBinary,AstBoolean,AstBracket,AstChoice,AstComposite,AstDot,AstEval,AstFunction,AstIdentifier,AstLiteral,AstMethod,AstNested,AstNode,AstNull,AstNumber,AstParameters,AstProperty,AstRightValue,AstString,AstText,AstUnary
public interface ExpressionNode extends Node
Expression node interface. This interface provides all the methods needed for value expressions and method expressions.- Author:
- Christoph Beck
- See Also:
Tree
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MethodInfogetMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes)Get method information.StringgetStructuralId(Bindings bindings)Get the canonical expression string for this node.Class<?>getType(Bindings bindings, ELContext context)Get the value type accepted insetValue(Bindings, ELContext, Object).ObjectgetValue(Bindings bindings, ELContext context, Class<?> expectedType)Evaluate node.ValueReferencegetValueReference(Bindings bindings, ELContext context)Get value reference.Objectinvoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] paramValues)Invoke method.booleanisLeftValue()booleanisLiteralText()booleanisMethodInvocation()booleanisReadOnly(Bindings bindings, ELContext context)Determine whethersetValue(Bindings, ELContext, Object)will throw aPropertyNotWritableException.voidsetValue(Bindings bindings, ELContext context, Object value)Assign value.-
Methods inherited from interface org.camunda.bpm.engine.impl.juel.Node
getCardinality, getChild
-
-
-
-
Method Detail
-
isLiteralText
boolean isLiteralText()
- Returns:
trueif this node represents literal text
-
isLeftValue
boolean isLeftValue()
- Returns:
trueif the subtree rooted at this node could be used as an lvalue expression (identifier or property sequence with non-literal prefix).
-
isMethodInvocation
boolean isMethodInvocation()
- Returns:
trueif the subtree rooted at this node is a method invocation.
-
getValue
Object getValue(Bindings bindings, ELContext context, Class<?> expectedType)
Evaluate node.- Parameters:
bindings- bindings containing variables and functionscontext- evaluation contextexpectedType- result type- Returns:
- evaluated node, coerced to the expected type
-
getValueReference
ValueReference getValueReference(Bindings bindings, ELContext context)
Get value reference.- Parameters:
bindings-context-- Returns:
- value reference
-
getType
Class<?> getType(Bindings bindings, ELContext context)
Get the value type accepted insetValue(Bindings, ELContext, Object).- Parameters:
bindings- bindings containing variables and functionscontext- evaluation context- Returns:
- accepted type or
nullfor non-lvalue nodes
-
isReadOnly
boolean isReadOnly(Bindings bindings, ELContext context)
Determine whethersetValue(Bindings, ELContext, Object)will throw aPropertyNotWritableException.- Parameters:
bindings- bindings containing variables and functionscontext- evaluation context- Returns:
trueif this a read-only expression node
-
setValue
void setValue(Bindings bindings, ELContext context, Object value)
Assign value.- Parameters:
bindings- bindings containing variables and functionscontext- evaluation contextvalue- value to set
-
getMethodInfo
MethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes)
Get method information. If this is a non-lvalue node, answernull.- Parameters:
bindings- bindings containing variables and functionscontext- evaluation contextreturnType- expected method return type (may benullmeaning don't care)paramTypes- expected method argument types- Returns:
- method information or
null
-
invoke
Object invoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] paramValues)
Invoke method.- Parameters:
bindings- bindings containing variables and functionscontext- evaluation contextreturnType- expected method return type (may benullmeaning don't care)paramTypes- expected method argument typesparamValues- parameter values- Returns:
- result of the method invocation
-
getStructuralId
String getStructuralId(Bindings bindings)
Get the canonical expression string for this node. Variable and funtion names will be replaced in a way such that two expression nodes that have the same node structure and bindings will also answer the same value here. For example,"${foo:bar()+2*foobar}"may lead to"${<fn>() + 2 * <var>}"iffoobaris a bound variable. Otherwise, the structural id would be"${<fn>() + 2 * foobar}". If the bindings isnull, the full canonical subexpression is returned.
-
-