com.waveset.expression
Class ExGet

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

public class ExGet
extends ExNode

A node representing an object accessor method.

Hmm, we could make this an ExFunction if we thought hard enough?


Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.expression.ExNode
_bindingCount, _children, _decoration, _parent, trace
 
Constructor Summary
ExGet()
          Make a set node.
 
Method Summary
protected  ExValue evalInternal(ExState state)
          Evaluate the node.
 java.lang.String getFunctionName()
          Return the node function name.
 void parseXml(org.w3c.dom.Element el)
          Parse the XML definition, and flesh out the object.
 void postProcess()
          Overload of the ExNode postProcess method that attempts to resolve static variable references.
 
Methods inherited from class com.waveset.expression.ExNode
addChild, addChildren, addCommonAttributes, beginTrace, clearOwner, endTrace, eval, evalChild, evalChildToObject, evalChildToString, evalToBoolean, evalToInt, evalToObject, evalToString, getBindingCount, getChild, getChildren, getDecoration, getHiddenVariable, getLocation, getOwner, getParent, isLiteral, parseCommonAttributes, removeChild, resolveFunction, resolveVariable, setBindingCount, setChildren, setDecoration, setEnvironment, setLocation, setOwner, setOwner, setParent, toXml, 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

ExGet

public ExGet()
Make a set node.

Method Detail

getFunctionName

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

Specified by:
getFunctionName in class ExNode

parseXml

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

Nothing to do now, but I left this here so we could experiment with attributes.

Overrides:
parseXml in class ExNode
Throws:
WavesetException

postProcess

public void postProcess()
Overload of the ExNode postProcess method that attempts to resolve static variable references.

Overrides:
postProcess in class ExNode

evalInternal

protected ExValue evalInternal(ExState state)
                        throws WavesetException
Evaluate the node.

There are two subexpressions, the first should return a value that is a List, Map, or Object. The second should be a String or Integer.

If the first argument is a List, the second argument is coerced to an integer and used as a list index.

If the first argument is a Map, the second argument is used as a map key.

If the first argument is any other object, the second argument is coerced to a string and reflection is used to access a field.

Specified by:
evalInternal in class ExNode
Throws:
WavesetException