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.SerializableUsed 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 booleanequals(java.lang.Object o)java.lang.ClassgetExpectedType()Returns the expected type.java.lang.StringgetRawValue()Returns the raw value.java.lang.ObjectgetValue(Evaluator eval, Component comp)Returns the value after evaluation.java.lang.ObjectgetValue(Evaluator eval, Page page)Returns the value after evaluation.inthashCode()booleanisExpression()Tests whether it is an expression.voidsetExpectedType(java.lang.Class expectedType)Sets the expected type.voidsetRawValue(java.lang.String value)Sets the raw value.java.lang.StringtoString()
-
-
-
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 org.zkoss.xel.XelException
Returns the value after evaluation.- Throws:
org.zkoss.xel.XelException
-
getValue
public java.lang.Object getValue(Evaluator eval, Component comp) throws org.zkoss.xel.XelException
Returns the value after evaluation.- Throws:
org.zkoss.xel.XelException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-