public class MockValueExpression
extends javax.el.ValueExpression
Mock implementation of ValueExpression.
This implementation supports a limited subset of overall expression functionality:
| Constructor and Description |
|---|
MockValueExpression(String expression,
Class expectedType)
Construct a new expression for the specified expression string.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Return
true if this expression is equal to the
specified expression. |
Class |
getExpectedType()
Return the type that the result of this expression will
be coerced to.
|
String |
getExpressionString()
Return the original String used to create this expression,
unmodified.
|
Class |
getType(javax.el.ELContext context)
Evaluate this expression relative to the specified context,
and return the most general type that is acceptable for the
value passed in a
setValue() call. |
Object |
getValue(javax.el.ELContext context)
Evaluate this expression relative to the specified context,
and return the result.
|
int |
hashCode()
Return the hash code for this expression.
|
boolean |
isLiteralText()
Return
true if the expression string for this expression
contains only literal text. |
boolean |
isReadOnly(javax.el.ELContext context)
Evaluate this expression relative to the specified context,
and return
true if a call to setValue()
will always fail. |
void |
setValue(javax.el.ELContext context,
Object value)
Evaluate this expression relative to the specified context,
and set the result to the specified value.
|
public boolean equals(Object obj)
Return true if this expression is equal to the
specified expression.
equals in class javax.el.Expressionobj - Object to be comparedpublic String getExpressionString()
Return the original String used to create this expression, unmodified.
getExpressionString in class javax.el.Expressionpublic int hashCode()
Return the hash code for this expression.
hashCode in class javax.el.Expressionpublic boolean isLiteralText()
Return true if the expression string for this expression
contains only literal text.
isLiteralText in class javax.el.Expressionpublic Class getExpectedType()
Return the type that the result of this expression will be coerced to.
getExpectedType in class javax.el.ValueExpressionpublic Class getType(javax.el.ELContext context)
Evaluate this expression relative to the specified context,
and return the most general type that is acceptable for the
value passed in a setValue() call.
getType in class javax.el.ValueExpressioncontext - ELContext for this evaluationpublic Object getValue(javax.el.ELContext context)
Evaluate this expression relative to the specified context, and return the result.
getValue in class javax.el.ValueExpressioncontext - ELContext for this evaluationpublic boolean isReadOnly(javax.el.ELContext context)
Evaluate this expression relative to the specified context,
and return true if a call to setValue()
will always fail.
isReadOnly in class javax.el.ValueExpressioncontext - ELContext for this evaluationpublic void setValue(javax.el.ELContext context,
Object value)
Evaluate this expression relative to the specified context, and set the result to the specified value.
setValue in class javax.el.ValueExpressioncontext - ELContext for this evaluationvalue - Value to which the result should be setCopyright © 2017 The Apache Software Foundation. All rights reserved.