Class ObjectValueExpression

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ObjectValueExpression
    extends javax.el.ValueExpression
    Object wrapper expression.
    See Also:
    Serialized Form
    • 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()
      Answer null.
      java.lang.Class<?> getType​(javax.el.ELContext context)
      Answer null.
      java.lang.Object getValue​(javax.el.ELContext context)
      Answer the wrapped object, coerced to the expected type.
      int hashCode()  
      boolean isLiteralText()
      Answer false.
      boolean isReadOnly​(javax.el.ELContext context)
      Answer true.
      void setValue​(javax.el.ELContext context, java.lang.Object value)
      Throw an exception.
      java.lang.String toString()  
      • Methods inherited from class javax.el.ValueExpression

        getValueReference
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • 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 converter
        object - the object to wrap
        type - the expected type this object will be coerced in getValue(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 class javax.el.Expression
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class javax.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 class javax.el.ValueExpression
      • getExpressionString

        public java.lang.String getExpressionString()
        Answer null.
        Specified by:
        getExpressionString in class javax.el.Expression
      • isLiteralText

        public boolean isLiteralText()
        Answer false.
        Specified by:
        isLiteralText in class javax.el.Expression
      • getType

        public java.lang.Class<?> getType​(javax.el.ELContext context)
        Answer null.
        Specified by:
        getType in class javax.el.ValueExpression
      • isReadOnly

        public boolean isReadOnly​(javax.el.ELContext context)
        Answer true.
        Specified by:
        isReadOnly in class javax.el.ValueExpression
      • setValue

        public void setValue​(javax.el.ELContext context,
                             java.lang.Object value)
        Throw an exception.
        Specified by:
        setValue in class javax.el.ValueExpression
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getExpectedType

        public java.lang.Class<?> getExpectedType()
        Specified by:
        getExpectedType in class javax.el.ValueExpression