com.waveset.expression
Class ExValueNode

java.lang.Object
  extended bycom.waveset.expression.ExNode
      extended bycom.waveset.expression.ExValueNode
All Implemented Interfaces:
com.sun.idm.debugger.common.Locatable

public class ExValueNode
extends ExNode

A node representing a literal value.


Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.expression.ExNode
_bindingCount, _children, _decoration, _parent, trace
 
Constructor Summary
ExValueNode()
          Build a value node.
ExValueNode(int i)
           
ExValueNode(java.lang.Object o)
           
 
Method Summary
 void beginTrace(java.lang.StringBuffer b)
          Called by ExState to format the start of a trace message for this node.
 void endTrace(java.lang.StringBuffer b)
          Called by ExState to format the end of a trace message for this node.
protected  ExValue evalInternal(ExState state)
          Evalute the value node.
 java.lang.Object getActualValue()
          Get the actual value avoiding the ExValue wrapper.
 java.lang.String getFunctionName()
          Get the node function name.
 ExValue getValue()
           
 boolean isLiteral()
          Called by ExState to determine if this node contains literal text, and therefore does not need a newline after the start tag.
 void parseXml(org.w3c.dom.Element el)
          Parse the an XML value, and flesh out the value node.
 void setInt(int i)
           
 void setValue(ExValue v)
          Assign a value to a value node.
 void setValue(java.lang.Object o)
          Convenience methods for the editor.
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize a value node back to XML.
 
Methods inherited from class com.waveset.expression.ExNode
addChild, addChildren, addCommonAttributes, clearOwner, eval, evalChild, evalChildToObject, evalChildToString, evalToBoolean, evalToInt, evalToObject, evalToString, getBindingCount, getChild, getChildren, getDecoration, getHiddenVariable, getLocation, getOwner, getParent, parseCommonAttributes, postProcess, removeChild, resolveFunction, resolveVariable, setBindingCount, setChildren, setDecoration, setEnvironment, setLocation, setOwner, setOwner, setParent, toXml, toXml, toXmlAttributes, toXmlChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

ExValueNode

public ExValueNode()
Build a value node.


ExValueNode

public ExValueNode(java.lang.Object o)

ExValueNode

public ExValueNode(int i)
Method Detail

getFunctionName

public java.lang.String getFunctionName()
Get the node function name.

Specified by:
getFunctionName in class ExNode

parseXml

public void parseXml(org.w3c.dom.Element el)
              throws WavesetException
Parse the an XML value, and flesh out the value node.

We'll be called for a variety of XML elements, so we have to check the tag name to see what type we are.

Overrides:
parseXml in class ExNode
Throws:
WavesetException

toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Serialize a value node back to XML. Have to overload the default method since we can have several tag names.

Extended to allow arbitrary XmlObject's as values, but you have to wrap them in an element.

Overrides:
toXml in class ExNode

setValue

public void setValue(ExValue v)
Assign a value to a value node. Used by some of the special node parsers that build nodes on the fly.


getValue

public ExValue getValue()

setValue

public void setValue(java.lang.Object o)
Convenience methods for the editor.


setInt

public void setInt(int i)

getActualValue

public java.lang.Object getActualValue()
Get the actual value avoiding the ExValue wrapper.


evalInternal

protected ExValue evalInternal(ExState state)
                        throws WavesetException
Evalute the value node. The value of this node is the value we contain.

Specified by:
evalInternal in class ExNode
Throws:
WavesetException

isLiteral

public boolean isLiteral()
Description copied from class: ExNode
Called by ExState to determine if this node contains literal text, and therefore does not need a newline after the start tag.

Overrides:
isLiteral in class ExNode

beginTrace

public void beginTrace(java.lang.StringBuffer b)
Description copied from class: ExNode
Called by ExState to format the start of a trace message for this node. By default, the begin trace mesage looks like an XML start tag, we use the value returned by the abstract getFunctionName method for the element name. Nodes can override this if they have more complicated trace information.

Overrides:
beginTrace in class ExNode

endTrace

public void endTrace(java.lang.StringBuffer b)
Description copied from class: ExNode
Called by ExState to format the end of a trace message for this node. By default, the begin trace mesage looks like an XML end tag, we use the value returned by the abstract getFunctionName method for the element name. Nodes can override this if they have more complicated trace information.

Overrides:
endTrace in class ExNode