Clover coverage report - PMD - 3.9
Coverage timestamp: Tue Dec 19 2006 09:38:44 EST
file stats: LOC: 85   Methods: 13
NCLOC: 61   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ASTMethodDeclaration.java 58.3% 77.8% 92.3% 76.9%
coverage coverage
 1    /* Generated By:JJTree: Do not edit this line. ASTMethodDeclaration.java */
 2   
 3    package net.sourceforge.pmd.ast;
 4   
 5    public class ASTMethodDeclaration extends AccessNode {
 6  4 public ASTMethodDeclaration(int id) {
 7  4 super(id);
 8    }
 9   
 10  1139 public ASTMethodDeclaration(JavaParser p, int id) {
 11  1139 super(p, id);
 12    }
 13   
 14    /**
 15    * Accept the visitor. *
 16    */
 17  3295 public Object jjtAccept(JavaParserVisitor visitor, Object data) {
 18  3295 return visitor.visit(this, data);
 19    }
 20   
 21  0 public void dump(String prefix) {
 22  0 System.out.println(collectDumpedModifiers(prefix));
 23  0 dumpChildren(prefix);
 24    }
 25   
 26    /**
 27    * Gets the name of the method.
 28    *
 29    * @return a String representing the name of the method
 30    */
 31  66 public String getMethodName() {
 32  66 ASTMethodDeclarator md = (ASTMethodDeclarator) getFirstChildOfType(ASTMethodDeclarator.class);
 33  66 if (md != null)
 34  66 return md.getImage();
 35  0 return null;
 36    }
 37   
 38  6 public boolean isSyntacticallyPublic() {
 39  6 return super.isPublic();
 40    }
 41   
 42  2 public boolean isSyntacticallyAbstract() {
 43  2 return super.isAbstract();
 44    }
 45   
 46  36 public boolean isPublic() {
 47  36 if (isInterfaceMember()) {
 48  0 return true;
 49    }
 50  36 return super.isPublic();
 51    }
 52   
 53  69 public boolean isAbstract() {
 54  69 if (isInterfaceMember()) {
 55  0 return true;
 56    }
 57  69 return super.isAbstract();
 58    }
 59   
 60  105 public boolean isInterfaceMember() {
 61  105 ASTClassOrInterfaceDeclaration clz = (ASTClassOrInterfaceDeclaration) getFirstParentOfType(ASTClassOrInterfaceDeclaration.class);
 62  105 return clz != null && clz.isInterface();
 63    }
 64   
 65  7 public boolean isVoid() {
 66  7 return ((ASTResultType) getFirstChildOfType(ASTResultType.class)).isVoid();
 67    }
 68   
 69  21 public ASTResultType getResultType() {
 70  21 return (ASTResultType) getFirstChildOfType(ASTResultType.class);
 71    }
 72   
 73  23 public ASTBlock getBlock() {
 74    // FIXME doesn't work for all methods that use generics and declare exceptions
 75  23 if (this.jjtGetChild(2) instanceof ASTBlock) {
 76  22 return (ASTBlock) this.jjtGetChild(2);
 77    }
 78  1 if (jjtGetNumChildren() > 3) {
 79  1 if (this.jjtGetChild(3) instanceof ASTBlock) {
 80  1 return (ASTBlock) this.jjtGetChild(3);
 81    }
 82    }
 83  0 return null;
 84    }
 85    }