Package de.odysseus.el
Class ObjectValueExpression
- java.lang.Object
-
- javax.el.Expression
-
- javax.el.ValueExpression
-
- de.odysseus.el.ObjectValueExpression
-
- All Implemented Interfaces:
java.io.Serializable
public final class ObjectValueExpression extends javax.el.ValueExpressionObject wrapper expression.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private TypeConverterconverterprivate java.lang.Objectobjectprivate static longserialVersionUIDprivate java.lang.Class<?>type
-
Constructor Summary
Constructors Constructor Description ObjectValueExpression(TypeConverter converter, java.lang.Object object, java.lang.Class<?> type)Wrap an object into a value expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Two object value expressions are equal if and only if their wrapped objects are equal.java.lang.Class<?>getExpectedType()java.lang.StringgetExpressionString()Answernull.java.lang.Class<?>getType(javax.el.ELContext context)Answernull.java.lang.ObjectgetValue(javax.el.ELContext context)Answer the wrapped object, coerced to the expected type.inthashCode()booleanisLiteralText()Answerfalse.booleanisReadOnly(javax.el.ELContext context)Answertrue.voidsetValue(javax.el.ELContext context, java.lang.Object value)Throw an exception.java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
converter
private final TypeConverter converter
-
object
private final java.lang.Object object
-
type
private final java.lang.Class<?> type
-
-
Constructor Detail
-
ObjectValueExpression
public ObjectValueExpression(TypeConverter converter, java.lang.Object object, java.lang.Class<?> type)
Wrap an object into a value expression.- Parameters:
converter- type converterobject- the object to wraptype- the expected type this object will be coerced ingetValue(ELContext).
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
Two object value expressions are equal if and only if their wrapped objects are equal.- Specified by:
equalsin classjavax.el.Expression
-
hashCode
public int hashCode()
- Specified by:
hashCodein classjavax.el.Expression
-
getValue
public java.lang.Object getValue(javax.el.ELContext context)
Answer the wrapped object, coerced to the expected type.- Specified by:
getValuein classjavax.el.ValueExpression
-
getExpressionString
public java.lang.String getExpressionString()
Answernull.- Specified by:
getExpressionStringin classjavax.el.Expression
-
isLiteralText
public boolean isLiteralText()
Answerfalse.- Specified by:
isLiteralTextin classjavax.el.Expression
-
getType
public java.lang.Class<?> getType(javax.el.ELContext context)
Answernull.- Specified by:
getTypein classjavax.el.ValueExpression
-
isReadOnly
public boolean isReadOnly(javax.el.ELContext context)
Answertrue.- Specified by:
isReadOnlyin classjavax.el.ValueExpression
-
setValue
public void setValue(javax.el.ELContext context, java.lang.Object value)Throw an exception.- Specified by:
setValuein classjavax.el.ValueExpression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getExpectedType
public java.lang.Class<?> getExpectedType()
- Specified by:
getExpectedTypein classjavax.el.ValueExpression
-
-