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.ValueExpression
Object wrapper expression.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private TypeConverter
converter
private java.lang.Object
object
private static long
serialVersionUID
private 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 boolean
equals(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.String
getExpressionString()
Answernull
.java.lang.Class<?>
getType(javax.el.ELContext context)
Answernull
.java.lang.Object
getValue(javax.el.ELContext context)
Answer the wrapped object, coerced to the expected type.int
hashCode()
boolean
isLiteralText()
Answerfalse
.boolean
isReadOnly(javax.el.ELContext context)
Answertrue
.void
setValue(javax.el.ELContext context, java.lang.Object value)
Throw an exception.java.lang.String
toString()
-
-
-
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:
equals
in classjavax.el.Expression
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classjavax.el.Expression
-
getValue
public java.lang.Object getValue(javax.el.ELContext context)
Answer the wrapped object, coerced to the expected type.- Specified by:
getValue
in classjavax.el.ValueExpression
-
getExpressionString
public java.lang.String getExpressionString()
Answernull
.- Specified by:
getExpressionString
in classjavax.el.Expression
-
isLiteralText
public boolean isLiteralText()
Answerfalse
.- Specified by:
isLiteralText
in classjavax.el.Expression
-
getType
public java.lang.Class<?> getType(javax.el.ELContext context)
Answernull
.- Specified by:
getType
in classjavax.el.ValueExpression
-
isReadOnly
public boolean isReadOnly(javax.el.ELContext context)
Answertrue
.- Specified by:
isReadOnly
in classjavax.el.ValueExpression
-
setValue
public void setValue(javax.el.ELContext context, java.lang.Object value)
Throw an exception.- Specified by:
setValue
in classjavax.el.ValueExpression
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getExpectedType
public java.lang.Class<?> getExpectedType()
- Specified by:
getExpectedType
in classjavax.el.ValueExpression
-
-