Package org.zkoss.zk.xel
Class ExValue
- java.lang.Object
-
- org.zkoss.zk.xel.ExValue
-
- All Implemented Interfaces:
java.io.Serializable
public class ExValue extends java.lang.Object implements java.io.Serializable
Used to represent a string value that might contain an expression. It is serializable and the expression is parsed by demand.- Since:
- 3.0.0
- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExValue(java.lang.String value, java.lang.Class expectedType)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.Class
getExpectedType()
Returns the expected type.java.lang.String
getRawValue()
Returns the raw value.java.lang.Object
getValue(Evaluator eval, Component comp)
Returns the value after evaluation.java.lang.Object
getValue(Evaluator eval, Page page)
Returns the value after evaluation.int
hashCode()
boolean
isExpression()
Tests whether it is an expression.void
setExpectedType(java.lang.Class expectedType)
Sets the expected type.void
setRawValue(java.lang.String value)
Sets the raw value.java.lang.String
toString()
-
-
-
Method Detail
-
isExpression
public boolean isExpression()
Tests whether it is an expression. Note: it is a wild guess. In other words, it returns false only if 100% not an expression.
-
getRawValue
public final java.lang.String getRawValue()
Returns the raw value. The raw value is the value passed to the constructor. That is, it might contain EL expressions.
-
setRawValue
public void setRawValue(java.lang.String value)
Sets the raw value.- Parameters:
value
- the value. It can be null.
-
getExpectedType
public final java.lang.Class getExpectedType()
Returns the expected type.
-
setExpectedType
public final void setExpectedType(java.lang.Class expectedType)
Sets the expected type.
-
getValue
public java.lang.Object getValue(Evaluator eval, Page page) throws XelException
Returns the value after evaluation.- Throws:
XelException
-
getValue
public java.lang.Object getValue(Evaluator eval, Component comp) throws XelException
Returns the value after evaluation.- Throws:
XelException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-