Clover coverage report - DynamicJava Test Coverage (dynamicjava-20110903-r5436)
Coverage timestamp: Sat Sep 3 2011 03:02:20 CDT
file stats: LOC: 54   Methods: 7
NCLOC: 34   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
CompilationUnit.java 0% 0% 0% 0%
coverage
 1    package koala.dynamicjava.tree;
 2   
 3    import java.util.List;
 4   
 5    import koala.dynamicjava.tree.visitor.Visitor;
 6   
 7    public class CompilationUnit extends Node {
 8   
 9    private PackageDeclaration package_; // may be null
 10    private List<ImportDeclaration> imports;
 11    private List<Node> declarations;
 12   
 13  0 public CompilationUnit(PackageDeclaration pkg, List<ImportDeclaration> imp, List<Node> decls) {
 14  0 this(pkg, imp, decls, SourceInfo.NONE);
 15    }
 16   
 17  0 public CompilationUnit(PackageDeclaration pkg, List<ImportDeclaration> imp, List<Node> decls, SourceInfo si) {
 18  0 super(si);
 19   
 20  0 if (imp == null) throw new IllegalArgumentException("imp == null");
 21  0 if (decls == null) throw new IllegalArgumentException("decls == null");
 22   
 23  0 package_ = pkg;
 24  0 imports = imp;
 25  0 declarations = decls;
 26    }
 27   
 28  0 public PackageDeclaration getPackage() {
 29  0 return package_;
 30    }
 31   
 32  0 public List<ImportDeclaration> getImports() {
 33  0 return imports;
 34    }
 35   
 36  0 public List<Node> getDeclarations() {
 37  0 return declarations;
 38    }
 39   
 40    /**
 41    * Allows a visitor to traverse the tree
 42    * @param visitor the visitor to accept
 43    */
 44  0 public <T> T acceptVisitor(Visitor<T> visitor) {
 45  0 return visitor.visit(this);
 46    }
 47   
 48    /**
 49    * Implementation of toString for use in unit testing
 50    */
 51  0 public String toString() {
 52  0 return "("+getClass().getName()+": "+getPackage()+", " + getImports() + ", " + getDeclarations() + ")";
 53    }
 54    }