Package org.zkoss.zel

## Class ValueExpression

- java.lang.Object
- - org.zkoss.zel.Expression
  - - org.zkoss.zel.ValueExpression

- All Implemented Interfaces:
    `java.io.Serializable`
  Direct Known Subclasses:
    `ValueExpressionImpl`, `ValueExpressionLiteral`

      public abstract class ValueExpression
      extends Expression

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ValueExpression()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract java.lang.Class<?>` | `getExpectedType()` |
    `abstract java.lang.Class<?>` | `getType​(ELContext context)` |
    `abstract java.lang.Object` | `getValue​(ELContext context)` |
    `ValueReference` | `getValueReference​(ELContext context)` |
    `abstract boolean` | `isReadOnly​(ELContext context)` |
    `abstract void` | `setValue​(ELContext context, java.lang.Object value)` |

    - ### Methods inherited from class org.zkoss.zel.Expression

      `equals, getExpressionString, hashCode, isLiteralText`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValueExpression

          public ValueExpression()

  - ### Method Detail

    - #### getValue

          public abstract java.lang.Object getValue​(ELContext context)

      Parameters:
        `context` - The EL context for this evaluation
      Returns:
        The result of evaluating this value expression
      Throws:
        `java.lang.NullPointerException` - If the supplied context is `null`
        `PropertyNotFoundException` - If a property/variable resolution failed because no match was found or a match was found but was not readable
        `ELException` - Wraps any exception throw whilst resolving a property or variable

    - #### setValue

          public abstract void setValue​(ELContext context,
                                        java.lang.Object value)

      Parameters:
        `context` - The EL context for this evaluation
        `value` - The value to set the property to which this value expression refers
      Throws:
        `java.lang.NullPointerException` - If the supplied context is `null`
        `PropertyNotFoundException` - If a property/variable resolution failed because no match was found
        `PropertyNotWritableException` - If a property/variable resolution failed because a match was found but was not writable
        `ELException` - Wraps any exception throw whilst resolving a property or variable

    - #### isReadOnly

          public abstract boolean isReadOnly​(ELContext context)

      Parameters:
        `context` - The EL context for this evaluation
      Returns:
        `true` if this expression is read only otherwise `false`
      Throws:
        `java.lang.NullPointerException` - If the supplied context is `null`
        `PropertyNotFoundException` - If a property/variable resolution failed because no match was found or a match was found but was not readable
        `ELException` - Wraps any exception throw whilst resolving a property or variable

    - #### getType

          public abstract java.lang.Class<?> getType​(ELContext context)

      Parameters:
        `context` - The EL context for this evaluation
      Returns:
        The type of the result of this value expression
      Throws:
        `java.lang.NullPointerException` - If the supplied context is `null`
        `PropertyNotFoundException` - If a property/variable resolution failed because no match was found or a match was found but was not readable
        `ELException` - Wraps any exception throw whilst resolving a property or variable

    - #### getExpectedType

          public abstract java.lang.Class<?> getExpectedType()

    - #### getValueReference

          public ValueReference getValueReference​(ELContext context)

      Parameters:
        `context` - The EL context for this evaluation
      Returns:
        This default implementation always returns `null`
      Since:
        EL 2.2