com.voytechs.jnetstream.npl
Class ReferenceNode
java.lang.Object
com.voytechs.jnetstream.npl.Node
com.voytechs.jnetstream.npl.ReferenceNode
- All Implemented Interfaces:
- IntNode, LongNode, StringNode, Visitable
- Direct Known Subclasses:
- MutableReferenceNode
public abstract class ReferenceNode
- extends Node
- implements IntNode, Visitable, StringNode, LongNode
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.voytechs.jnetstream.npl.Visitable |
visit |
name
protected java.lang.String name
reference
protected ReferenceNode reference
ReferenceNode
public ReferenceNode(java.lang.String name)
- Parameters:
-
- Throws:
getContext
protected abstract Context getContext()
setReference
public void setReference(ReferenceNode reference)
getPrimitive
public Primitive getPrimitive()
getInt
public int getInt()
- Specified by:
getInt in interface IntNode
getLong
public long getLong()
- Specified by:
getLong in interface LongNode
isConstant
public boolean isConstant()
getString
public java.lang.String getString()
- Specified by:
getString in interface StringNode
getName
public java.lang.String getName()
- Get the name of the variable.
setName
public void setName(java.lang.String name)
throws NodeException
- Sets a new name for the reference node.
- Throws:
NodeException
optimize
public Node optimize()
- Specified by:
optimize in class Node
canOptimize
public boolean canOptimize()
- Specified by:
canOptimize in class Node
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
main
public static void main(java.lang.String[] args)
- Test function for ReferenceNode
- Parameters:
args - command line arguments