|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectorg.activiti.engine.impl.javax.el.Expression
org.activiti.engine.impl.javax.el.ValueExpression
org.activiti.engine.impl.juel.TreeValueExpression
public final class TreeValueExpression
A value expression is ready to be evaluated (by calling either
getType(ELContext)
, getValue(ELContext)
, isReadOnly(ELContext)
or setValue(ELContext, Object)
.
Instances of this class are usually created using an ExpressionFactoryImpl
.
构造方法摘要 | |
---|---|
TreeValueExpression(TreeStore store,
FunctionMapper functions,
VariableMapper variables,
TypeConverter converter,
String expr,
Class<?> type)
Create a new value 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. |
Class<?> |
getExpectedType()
Returns the type the result of the expression will be coerced to after evaluation. |
String |
getExpressionString()
Returns the original String used to create this Expression, unmodified. |
Class<?> |
getType(ELContext context)
Evaluates the expression as an lvalue and answers the result type. |
Object |
getValue(ELContext context)
Evaluates the expression as an rvalue and answers the result. |
ValueReference |
getValueReference(ELContext context)
Returns a ValueReference for this expression instance. |
int |
hashCode()
Returns the hash code for this Expression. |
boolean |
isDeferred()
Answer true if this is a deferred expression (containing
sub-expressions starting with #{ ) |
boolean |
isLeftValue()
Answer true if this could be used as an lvalue. |
boolean |
isLiteralText()
Returns whether this expression was created from only literal text. |
boolean |
isReadOnly(ELContext context)
Evaluates the expression as an lvalue and determines if setValue(ELContext, Object)
will always fail. |
void |
setValue(ELContext context,
Object value)
Evaluates the expression as an lvalue and assigns the given value. |
String |
toString()
|
从类 java.lang.Object 继承的方法 |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
构造方法详细信息 |
---|
public TreeValueExpression(TreeStore store, FunctionMapper functions, VariableMapper variables, TypeConverter converter, String expr, Class<?> type)
store
- used to get the parse tree from.functions
- the function mapper used to bind functionsvariables
- the variable mapper used to bind variablesexpr
- the expression stringtype
- the expected type (may be null
)方法详细信息 |
---|
public Class<?> getExpectedType()
ValueExpression
复制的描述
ValueExpression
中的 getExpectedType
public String getExpressionString()
Expression
复制的描述
Expression
中的 getExpressionString
public Class<?> getType(ELContext context) throws ELException
ValueExpression
中的 getType
context
- used to resolve properties (base.property
and base[property]
)
and to determine the result from the last base/property pair
null
for rvalue expressions
ELException
- if evaluation fails (e.g. property not found, type conversion failed, ...)public Object getValue(ELContext context) throws ELException
ValueExpression
中的 getValue
context
- used to resolve properties (base.property
and base[property]
)
and to determine the result from the last base/property pair
ELException
- if evaluation fails (e.g. property not found, type conversion failed, ...)public boolean isReadOnly(ELContext context) throws ELException
setValue(ELContext, Object)
will always fail.
ValueExpression
中的 isReadOnly
context
- used to resolve properties (base.property
and base[property]
)
and to determine the result from the last base/property pair
true
if setValue(ELContext, Object)
always fails.
ELException
- if evaluation fails (e.g. property not found, type conversion failed, ...)public void setValue(ELContext context, Object value) throws ELException
ValueExpression
中的 setValue
context
- used to resolve properties (base.property
and base[property]
)
and to perform the assignment to the last base/property pairvalue
- The new value to be set.
ELException
- if evaluation fails (e.g. property not found, type conversion failed, assignment failed...)public boolean isLiteralText()
Expression
复制的描述
Expression
中的 isLiteralText
true
if this is a literal text expressionpublic ValueReference getValueReference(ELContext context)
ValueExpression
复制的描述ValueReference
for this expression instance.
ValueExpression
中的 getValueReference
context
- the context of this evaluation
ValueReference
for this ValueExpression
, or
null
if this ValueExpression
is not a reference to a base
(null or non-null) and a property. If the base is null, and the property is a EL
variable, return the ValueReference
for the ValueExpression
associated with this EL variable.public boolean isLeftValue()
true
if this could be used as an lvalue.
This is the case for eval expressions consisting of a simple identifier or
a nonliteral prefix, followed by a sequence of property operators (.
or []
)
public boolean isDeferred()
true
if this is a deferred expression (containing
sub-expressions starting with #{
)
public boolean equals(Object obj)
Expression
中的 equals
obj
- the Object to test for equality.
public int hashCode()
Expression
复制的描述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
Expression.equals(Object)
,
Hashtable
,
Object.hashCode()
public String toString()
Object
中的 toString
public void dump(PrintWriter writer)
writer
-
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |