| javax.el.ValueExpression de.odysseus.el.TreeValueExpression
Method Summary | |
public void | dump(PrintWriter writer) Print the parse tree. | 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. | public Class> | getExpectedType() | public String | getExpressionString() | public Class> | getType(ELContext context) Evaluates the expression as an lvalue and answers the result type.
Parameters: context - used to resolve properties (base.property and base[property] )and to determine the result from the last base/property pair lvalue evaluation type or null for rvalue expressions throws: ELException - if evaluation fails (e.g. | public Object | getValue(ELContext context) Evaluates the expression as an rvalue and answers the result.
Parameters: context - used to resolve properties (base.property and base[property] )and to determine the result from the last base/property pair rvalue evaluation result throws: ELException - if evaluation fails (e.g. | public int | hashCode() | public boolean | isDeferred() | public boolean | isLeftValue() Answer true if this could be used as an lvalue. | public boolean | isLiteralText() | public boolean | isReadOnly(ELContext context) Evaluates the expression as an lvalue and determines if
TreeValueExpression.setValue(ELContext,Object) will always fail.
Parameters: context - used to resolve properties (base.property and base[property] )and to determine the result from the last base/property pair true if TreeValueExpression.setValue(ELContext,Object) always fails. throws: ELException - if evaluation fails (e.g. | public void | setValue(ELContext context, Object value) Evaluates the expression as an lvalue and assigns the given value.
Parameters: context - used to resolve properties (base.property and base[property] )and to perform the assignment to the last base/property pair throws: ELException - if evaluation fails (e.g. | public String | toString() |
TreeValueExpression | public TreeValueExpression(TreeStore store, FunctionMapper functions, VariableMapper variables, String expr, Class> type)(Code) | | Create a new value expression.
Parameters: store - used to get the parse tree from. Parameters: functions - the function mapper used to bind functions Parameters: variables - the variable mapper used to bind variables Parameters: expr - the expression string Parameters: type - the expected type (may be null ) |
dump | public void dump(PrintWriter writer)(Code) | | Print the parse tree.
Parameters: writer - |
equals | public boolean equals(Object obj)(Code) | | 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 value expressions are equal if
- their structural id's are equal
- their bindings are equal
- their expected types are equal
|
getExpressionString | public String getExpressionString()(Code) | | |
getType | public Class> getType(ELContext context) throws ELException(Code) | | Evaluates the expression as an lvalue and answers the result type.
Parameters: context - used to resolve properties (base.property and base[property] )and to determine the result from the last base/property pair lvalue evaluation type or null for rvalue expressions throws: ELException - if evaluation fails (e.g. property not found, type conversion failed, ...) |
getValue | public Object getValue(ELContext context) throws ELException(Code) | | Evaluates the expression as an rvalue and answers the result.
Parameters: context - used to resolve properties (base.property and base[property] )and to determine the result from the last base/property pair rvalue evaluation result throws: ELException - if evaluation fails (e.g. property not found, type conversion failed, ...) |
hashCode | public int hashCode()(Code) | | |
isDeferred | public boolean isDeferred()(Code) | | Answer true if this is a deferred expression (containing
sub-expressions starting with #{ )
|
isLeftValue | public boolean isLeftValue()(Code) | | Answer 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 [] )
|
isLiteralText | public boolean isLiteralText()(Code) | | true if this is a literal text expression |
setValue | public void setValue(ELContext context, Object value) throws ELException(Code) | | Evaluates the expression as an lvalue and assigns the given value.
Parameters: context - used to resolve properties (base.property and base[property] )and to perform the assignment to the last base/property pair throws: ELException - if evaluation fails (e.g. property not found, type conversion failed, assignment failed...) |
|
|