org.activiti.engine.impl.juel
接口 ExpressionNode

所有超级接口:
Node
所有已知实现类:
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.

作者:
Christoph Beck
另请参见:
Tree

方法摘要
 MethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes)
          Get method information.
 String getStructuralId(Bindings bindings)
          Get the canonical expression string for this node.
 Class<?> getType(Bindings bindings, ELContext context)
          Get the value type accepted in setValue(Bindings, ELContext, Object).
 Object getValue(Bindings bindings, ELContext context, Class<?> expectedType)
          Evaluate node.
 ValueReference getValueReference(Bindings bindings, ELContext context)
          Get value reference.
 Object invoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] paramValues)
          Invoke method.
 boolean isLeftValue()
           
 boolean isLiteralText()
           
 boolean isMethodInvocation()
           
 boolean isReadOnly(Bindings bindings, ELContext context)
          Determine whether setValue(Bindings, ELContext, Object) will throw a PropertyNotWritableException.
 void setValue(Bindings bindings, ELContext context, Object value)
          Assign value.
 
从接口 org.activiti.engine.impl.juel.Node 继承的方法
getCardinality, getChild
 

方法详细信息

isLiteralText

boolean isLiteralText()
返回:
true if this node represents literal text

isLeftValue

boolean isLeftValue()
返回:
true if the subtree rooted at this node could be used as an lvalue expression (identifier or property sequence with non-literal prefix).

isMethodInvocation

boolean isMethodInvocation()
返回:
true if the subtree rooted at this node is a method invocation.

getValue

Object getValue(Bindings bindings,
                ELContext context,
                Class<?> expectedType)
Evaluate node.

参数:
bindings - bindings containing variables and functions
context - evaluation context
expectedType - result type
返回:
evaluated node, coerced to the expected type

getValueReference

ValueReference getValueReference(Bindings bindings,
                                 ELContext context)
Get value reference.

参数:
bindings -
context -
返回:
value reference

getType

Class<?> getType(Bindings bindings,
                 ELContext context)
Get the value type accepted in setValue(Bindings, ELContext, Object).

参数:
bindings - bindings containing variables and functions
context - evaluation context
返回:
accepted type or null for non-lvalue nodes

isReadOnly

boolean isReadOnly(Bindings bindings,
                   ELContext context)
Determine whether setValue(Bindings, ELContext, Object) will throw a PropertyNotWritableException.

参数:
bindings - bindings containing variables and functions
context - evaluation context
返回:
true if this a read-only expression node

setValue

void setValue(Bindings bindings,
              ELContext context,
              Object value)
Assign value.

参数:
bindings - bindings containing variables and functions
context - evaluation context
value - value to set

getMethodInfo

MethodInfo getMethodInfo(Bindings bindings,
                         ELContext context,
                         Class<?> returnType,
                         Class<?>[] paramTypes)
Get method information. If this is a non-lvalue node, answer null.

参数:
bindings - bindings containing variables and functions
context - evaluation context
returnType - expected method return type (may be null meaning don't care)
paramTypes - expected method argument types
返回:
method information or null

invoke

Object invoke(Bindings bindings,
              ELContext context,
              Class<?> returnType,
              Class<?>[] paramTypes,
              Object[] paramValues)
Invoke method.

参数:
bindings - bindings containing variables and functions
context - evaluation context
returnType - expected method return type (may be null meaning don't care)
paramTypes - expected method argument types
paramValues - parameter values
返回:
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>}" if foobar is a bound variable. Otherwise, the structural id would be "${<fn>() + 2 * foobar}".

If the bindings is null, the full canonical subexpression is returned.



Copyright © 2013 Alfresco. All rights reserved.