public final class ObjectValueExpression extends ValueExpression
| Constructor and Description |
|---|
ObjectValueExpression(TypeConverter converter,
Object object,
Class<?> type)
Wrap an object into a value expression.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Two object value expressions are equal if and only if their wrapped objects are equal.
|
Class<?> |
getExpectedType()
Returns the type the result of the expression will be coerced to after evaluation.
|
String |
getExpressionString()
Answer
null. |
Class<?> |
getType(ELContext context)
Answer
null. |
Object |
getValue(ELContext context)
Answer the wrapped object, coerced to the expected type.
|
int |
hashCode()
Returns the hash code for this Expression.
|
boolean |
isLiteralText()
Answer
false. |
boolean |
isReadOnly(ELContext context)
Answer
true. |
void |
setValue(ELContext context,
Object value)
Throw an exception.
|
String |
toString() |
getValueReferencepublic ObjectValueExpression(TypeConverter converter, Object object, Class<?> type)
converter - type converterobject - the object to wraptype - the expected type this object will be coerced in getValue(ELContext).public boolean equals(Object obj)
equals in class Expressionobj - the Object to test for equality.public int hashCode()
ExpressionExpression.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.hashCode in class ExpressionExpression.equals(Object),
Hashtable,
Object.hashCode()public Object getValue(ELContext context)
getValue in class ValueExpressioncontext - The context of this evaluation.public String getExpressionString()
null.getExpressionString in class Expressionpublic boolean isLiteralText()
false.isLiteralText in class Expressionpublic Class<?> getType(ELContext context)
null.getType in class ValueExpressioncontext - The context of this evaluation.public boolean isReadOnly(ELContext context)
true.isReadOnly in class ValueExpressioncontext - The context of this evaluation.public void setValue(ELContext context, Object value)
setValue in class ValueExpressioncontext - The context of this evaluation.value - The new value to be set.public Class<?> getExpectedType()
ValueExpressiongetExpectedType in class ValueExpressionCopyright © 2019. All rights reserved.