com.voytechs.jnetstream.npl
Class MutableReferenceNode

java.lang.Object
  extended by com.voytechs.jnetstream.npl.Node
      extended by com.voytechs.jnetstream.npl.ReferenceNode
          extended by com.voytechs.jnetstream.npl.MutableReferenceNode
All Implemented Interfaces:
IntNode, LongNode, MutableIntNode, MutableLongNode, MutableStringNode, StringNode, Visitable
Direct Known Subclasses:
ConstReferenceNode

public class MutableReferenceNode
extends ReferenceNode
implements MutableIntNode, MutableLongNode, MutableStringNode

Allows modification to value of the node at run time.


Field Summary
 
Fields inherited from class com.voytechs.jnetstream.npl.ReferenceNode
name, reference
 
Fields inherited from class com.voytechs.jnetstream.npl.Node
parent
 
Constructor Summary
MutableReferenceNode(java.lang.String name)
           
MutableReferenceNode(java.lang.String name, Token token)
           
 
Method Summary
protected  Context getContext()
          Extracts the current context.
 SymTable getSymTable()
           
 Token getToken()
          Returns the token for this reference node.
static void main(java.lang.String[] args)
          Test function for MutableReferenceNode
 void setIntValue(int value)
           
 void setLongValue(long value)
           
 void setStringValue(java.lang.String value)
           
 void setSymTable(SymTable sym)
           
 boolean visit(Visitor visitor, java.lang.Object user1, java.lang.Object user2)
           
 
Methods inherited from class com.voytechs.jnetstream.npl.ReferenceNode
canOptimize, getInt, getLong, getName, getPrimitive, getString, isConstant, optimize, setName, setReference, toString
 
Methods inherited from class com.voytechs.jnetstream.npl.Node
getParent, setParent, setToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableReferenceNode

public MutableReferenceNode(java.lang.String name)
Parameters:
-
Throws:

MutableReferenceNode

public MutableReferenceNode(java.lang.String name,
                            Token token)
Parameters:
-
Throws:
Method Detail

visit

public boolean visit(Visitor visitor,
                     java.lang.Object user1,
                     java.lang.Object user2)
              throws NodeException
Specified by:
visit in interface Visitable
Throws:
NodeException

setIntValue

public void setIntValue(int value)
Specified by:
setIntValue in interface MutableIntNode

setLongValue

public void setLongValue(long value)
Specified by:
setLongValue in interface MutableLongNode

setStringValue

public void setStringValue(java.lang.String value)
Specified by:
setStringValue in interface MutableStringNode

setSymTable

public void setSymTable(SymTable sym)

getSymTable

public SymTable getSymTable()

getContext

protected Context getContext()
Extracts the current context.

Specified by:
getContext in class ReferenceNode

getToken

public Token getToken()
Returns the token for this reference node.

Overrides:
getToken in class Node

main

public static void main(java.lang.String[] args)
Test function for MutableReferenceNode

Parameters:
args - command line arguments