koala.dynamicjava.tree
Class TypeExpression

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.TypeExpression
All Implemented Interfaces:
SourceInfo.Wrapper

public class TypeExpression
extends PrimaryExpression

This class represents the type expression nodes of the syntax tree

Version:
1.0 - 1999/04/24
Author:
Stephane Hillion

Constructor Summary
TypeExpression(TypeName t)
          Initializes the expression
TypeExpression(TypeName t, SourceInfo si)
          Initializes the expression
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 TypeName getType()
          Returns the type represented by this expression
 void setType(ReferenceTypeName t)
          Sets the type
 java.lang.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

TypeExpression

public TypeExpression(TypeName t)
Initializes the expression

Parameters:
t - the type represented by this expression
Throws:
java.lang.IllegalArgumentException - if t is null

TypeExpression

public TypeExpression(TypeName t,
                      SourceInfo si)
Initializes the expression

Parameters:
t - the type represented by this expression
Throws:
java.lang.IllegalArgumentException - if t is null
Method Detail

getType

public TypeName getType()
Returns the type represented by this expression


setType

public void setType(ReferenceTypeName t)
Sets the type

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