koala.dynamicjava.tree
Class VariableAccess

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Expression
          extended by koala.dynamicjava.tree.PrimaryExpression
              extended by koala.dynamicjava.tree.VariableAccess
All Implemented Interfaces:
LeftHandSide, SourceInfo.Wrapper

public class VariableAccess
extends PrimaryExpression
implements LeftHandSide


Constructor Summary
VariableAccess(String varName)
          Creates a new field access node
VariableAccess(String varName, SourceInfo si)
          Creates a new field access node
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 String getVariableName()
          Returns the field name
 void setVariableName(String s)
          Sets the field name
 String toString()
          Implementation of toString for use in unit testing
 
Methods inherited from class koala.dynamicjava.tree.Node
archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableAccess

public VariableAccess(String varName)
Creates a new field access node

Parameters:
varName - the variable name
Throws:
IllegalArgumentException - if varName is null

VariableAccess

public VariableAccess(String varName,
                      SourceInfo si)
Creates a new field access node

Parameters:
varName - the variable name
Throws:
IllegalArgumentException - if varName is null
Method Detail

getVariableName

public String getVariableName()
Returns the field name


setVariableName

public void setVariableName(String s)
Sets the field name


acceptVisitor

public <T> T acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree

Specified by:
acceptVisitor in class Node
Parameters:
visitor - the visitor to accept

toString

public String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class Object