org.activiti.engine.impl.juel
类 TreeMethodExpression

java.lang.Object
  继承者 org.activiti.engine.impl.javax.el.Expression
      继承者 org.activiti.engine.impl.javax.el.MethodExpression
          继承者 org.activiti.engine.impl.juel.TreeMethodExpression
所有已实现的接口:
Serializable

public final class TreeMethodExpression
extends MethodExpression

A method expression is ready to be evaluated (by calling either invoke(ELContext, Object[]) or getMethodInfo(ELContext)). Instances of this class are usually created using an ExpressionFactoryImpl.

作者:
Christoph Beck
另请参见:
序列化表格

构造方法摘要
TreeMethodExpression(TreeStore store, FunctionMapper functions, VariableMapper variables, TypeConverter converter, String expr, Class<?> returnType, Class<?>[] paramTypes)
          Create a new method expression.
 
方法摘要
 void dump(PrintWriter writer)
          Print the parse tree.
 boolean equals(Object obj)
          Expressions are compared using the concept of a structural id: variable and function names are anonymized such that two expressions with same tree structure will also have the same structural id and vice versa.
 String getExpressionString()
          Returns the original String used to create this Expression, unmodified.
 MethodInfo getMethodInfo(ELContext context)
          Evaluates the expression and answers information about the method
 int hashCode()
          Returns the hash code for this Expression.
 Object invoke(ELContext context, Object[] paramValues)
          Evaluates the expression and invokes the method.
 boolean isDeferred()
          Answer true if this is a deferred expression (starting with #{)
 boolean isLiteralText()
          Returns whether this expression was created from only literal text.
 boolean isParmetersProvided()
          Return whether this MethodExpression was created with parameters.
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

TreeMethodExpression

public TreeMethodExpression(TreeStore store,
                            FunctionMapper functions,
                            VariableMapper variables,
                            TypeConverter converter,
                            String expr,
                            Class<?> returnType,
                            Class<?>[] paramTypes)
Create a new method expression. The expression must be an lvalue expression or literal text. The expected return type may be null, meaning "don't care". If it is an lvalue expression, the parameter types must not be null. If it is literal text, the expected return type must not be void.

参数:
store - used to get the parse tree from.
functions - the function mapper used to bind functions
variables - the variable mapper used to bind variables
expr - the expression string
returnType - the expected return type (may be null)
paramTypes - the expected parameter types (must not be null for lvalues)
方法详细信息

getMethodInfo

public MethodInfo getMethodInfo(ELContext context)
                         throws ELException
Evaluates the expression and answers information about the method

指定者:
MethodExpression 中的 getMethodInfo
参数:
context - used to resolve properties (base.property and base[property])
返回:
method information or null for literal expressions
抛出:
ELException - if evaluation fails (e.g. suitable method not found)

getExpressionString

public String getExpressionString()
从类 Expression 复制的描述
Returns the original String used to create this Expression, unmodified. This is used for debugging purposes but also for the purposes of comparison (e.g. to ensure the expression in a configuration file has not changed). This method does not provide sufficient information to re-create an expression. Two different expressions can have exactly the same expression string but different function mappings. Serialization should be used to save and restore the state of an Expression.

指定者:
Expression 中的 getExpressionString
返回:
The original expression String.

invoke

public Object invoke(ELContext context,
                     Object[] paramValues)
              throws ELException
Evaluates the expression and invokes the method.

指定者:
MethodExpression 中的 invoke
参数:
context - used to resolve properties (base.property and base[property])
paramValues -
返回:
method result or null if this is a literal text expression
抛出:
ELException - if evaluation fails (e.g. suitable method not found)

isLiteralText

public boolean isLiteralText()
从类 Expression 复制的描述
Returns whether this expression was created from only literal text. This method must return true if and only if the expression string this expression was created from contained no unescaped EL delimeters (${...} or #{...}).

指定者:
Expression 中的 isLiteralText
返回:
true if this is a literal text expression

isParmetersProvided

public boolean isParmetersProvided()
从类 MethodExpression 复制的描述
Return whether this MethodExpression was created with parameters.

This method must return true if and only if parameters are specified in the EL, using the expr-a.expr-b(...) syntax.

覆盖:
MethodExpression 中的 isParmetersProvided
返回:
true if this is a method invocation expression

isDeferred

public boolean isDeferred()
Answer true if this is a deferred expression (starting with #{)


equals

public boolean equals(Object obj)
Expressions are compared using the concept of a structural id: variable and function names are anonymized such that two expressions with same tree structure will also have the same structural id and vice versa. Two method expressions are equal if
  1. their builders are equal
  2. their structural id's are equal
  3. their bindings are equal
  4. their expected types match
  5. their parameter types are equal

指定者:
Expression 中的 equals
参数:
obj - the Object to test for equality.
返回:
true if obj equals this Expression; false otherwise.

hashCode

public int hashCode()
从类 Expression 复制的描述
Returns the hash code for this Expression. See the note in the Expression.equals(Object) method on how two expressions can be equal if their expression Strings are different. Recall that if two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. Implementations must take special note and implement hashCode correctly.

指定者:
Expression 中的 hashCode
返回:
The hash code for this Expression.
另请参见:
Expression.equals(Object), Hashtable, Object.hashCode()

toString

public String toString()
覆盖:
Object 中的 toString

dump

public void dump(PrintWriter writer)
Print the parse tree.

参数:
writer -


Copyright © 2013 Alfresco. All rights reserved.