org.zkoss.zk.xel
Class ExValue

java.lang.Object
  extended by 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
ExValue(java.lang.String value, java.lang.Class expectedType)
          Constructor.
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExValue

public ExValue(java.lang.String value,
               java.lang.Class expectedType)
Constructor.

Parameters:
value - the value. It can be null.
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 class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo