koala.dynamicjava.tree
Class CompilationUnit

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.CompilationUnit
All Implemented Interfaces:
SourceInfo.Wrapper

public class CompilationUnit
extends Node


Constructor Summary
CompilationUnit(PackageDeclaration pkg, java.util.List<ImportDeclaration> imp, java.util.List<Node> decls)
           
CompilationUnit(PackageDeclaration pkg, java.util.List<ImportDeclaration> imp, java.util.List<Node> decls, SourceInfo si)
           
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 java.util.List<Node> getDeclarations()
           
 java.util.List<ImportDeclaration> getImports()
           
 PackageDeclaration getPackage()
           
 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

CompilationUnit

public CompilationUnit(PackageDeclaration pkg,
                       java.util.List<ImportDeclaration> imp,
                       java.util.List<Node> decls)

CompilationUnit

public CompilationUnit(PackageDeclaration pkg,
                       java.util.List<ImportDeclaration> imp,
                       java.util.List<Node> decls,
                       SourceInfo si)
Method Detail

getPackage

public PackageDeclaration getPackage()

getImports

public java.util.List<ImportDeclaration> getImports()

getDeclarations

public java.util.List<Node> getDeclarations()

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