Clover coverage report - PMD - 3.7
Coverage timestamp: Wed May 31 2006 09:25:59 EDT
file stats: LOC: 62   Methods: 10
NCLOC: 43   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ASTImportDeclaration.java 100% 93.8% 90% 93.3%
coverage coverage
 1    /* Generated By:JJTree: Do not edit this line. ASTImportDeclaration.java */
 2   
 3    package net.sourceforge.pmd.ast;
 4   
 5    public class ASTImportDeclaration extends SimpleJavaNode {
 6   
 7    private boolean isImportOnDemand;
 8    private boolean isStatic;
 9   
 10  0 public ASTImportDeclaration(int id) {
 11  0 super(id);
 12    }
 13   
 14  74 public ASTImportDeclaration(JavaParser p, int id) {
 15  74 super(p, id);
 16    }
 17   
 18  41 public void setImportOnDemand() {
 19  41 isImportOnDemand = true;
 20    }
 21   
 22  24 public boolean isImportOnDemand() {
 23  24 return isImportOnDemand;
 24    }
 25   
 26  1 public void setStatic() {
 27  1 isStatic = true;
 28    }
 29   
 30  1 public boolean isStatic() {
 31  1 return isStatic;
 32    }
 33   
 34    // TODO - this should go away
 35  15 public ASTName getImportedNameNode() {
 36  15 return (ASTName) jjtGetChild(0);
 37    }
 38   
 39  36 public String getImportedName() {
 40  36 return ((ASTName) jjtGetChild(0)).getImage();
 41    }
 42   
 43  11 public String getPackageName() {
 44  11 String importName = getImportedName();
 45  11 if (isImportOnDemand) {
 46  6 return importName;
 47    }
 48  5 if (importName.indexOf('.') == -1) {
 49  2 return "";
 50    }
 51  3 int lastDot = importName.lastIndexOf('.');
 52  3 return importName.substring(0, lastDot);
 53    }
 54   
 55   
 56    /**
 57    * Accept the visitor. *
 58    */
 59  198 public Object jjtAccept(JavaParserVisitor visitor, Object data) {
 60  198 return visitor.visit(this, data);
 61    }
 62    }