koala.dynamicjava.tree
Class StaticFieldAccess

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.FieldAccess
                  extended by koala.dynamicjava.tree.StaticFieldAccess
All Implemented Interfaces:
LeftHandSide, SourceInfo.Wrapper

public class StaticFieldAccess
extends FieldAccess

This class represents the field access nodes of the syntax tree

Version:
1.0 - 1999/05/01
Author:
Stephane Hillion

Constructor Summary
StaticFieldAccess(ReferenceTypeName typ, java.lang.String fln)
          Creates a new field access node
StaticFieldAccess(ReferenceTypeName typ, java.lang.String fln, SourceInfo si)
          Creates a new field access node
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 ReferenceTypeName getFieldType()
          Returns the declaring type of the field
 void setFieldType(ReferenceTypeName t)
          Sets the declaring type of the field
 java.lang.String toString()
          Implementation of toString for use in unit testing
 
Methods inherited from class koala.dynamicjava.tree.FieldAccess
getFieldName, setFieldName
 
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

StaticFieldAccess

public StaticFieldAccess(ReferenceTypeName typ,
                         java.lang.String fln)
Creates a new field access node

Parameters:
typ - the type on which this field access applies
fln - the field name
Throws:
java.lang.IllegalArgumentException - if typ is null or fln is null

StaticFieldAccess

public StaticFieldAccess(ReferenceTypeName typ,
                         java.lang.String fln,
                         SourceInfo si)
Creates a new field access node

Parameters:
typ - the type on which this field access applies
fln - the field name
Throws:
java.lang.IllegalArgumentException - if typ is null or fln is null
Method Detail

getFieldType

public ReferenceTypeName getFieldType()
Returns the declaring type of the field


setFieldType

public void setFieldType(ReferenceTypeName t)
Sets the declaring type of the field

Throws:
java.lang.IllegalArgumentException - if t is null

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 java.lang.String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class java.lang.Object