Clover coverage report - PMD - 3.9 Coverage timestamp: Tue Dec 19 2006 09:38:44 EST FRAMES NO FRAMES |
file stats: | LOC: | 41 |  | Methods: | 6
| NCLOC: | 28 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
ASTType.java | 75% | 90.9% | 100% | 90.5% |

1 |  | /* Generated By:JJTree: Do not edit this line. ASTType.java */
2 |  |
3 |  | package net.sourceforge.pmd.ast;
4 |  |
5 |  | public class ASTType extends SimpleJavaNode {
6 | 1 | public ASTType(int id) {
7 | 1 | super(id);
8 |  | }
9 |  |
10 | 1773 | public ASTType(JavaParser p, int id) {
11 | 1773 | super(p, id);
12 |  | }
13 |  |
14 |  | /**
15 |  | * Accept the visitor. *
16 |  | */
17 | 4788 | public Object jjtAccept(JavaParserVisitor visitor, Object data) {
18 | 4788 | return visitor.visit(this, data);
19 |  | }
20 |  |
21 | 10 | public String getTypeImage() {
22 | 10 | ASTPrimitiveType prim = (ASTPrimitiveType) getFirstChildOfType(ASTPrimitiveType.class);
23 | 10 | if (prim != null) {
24 | 2 | return prim.getImage();
25 |  | }
26 | 8 | return ((ASTClassOrInterfaceType) getFirstChildOfType(ASTClassOrInterfaceType.class)).getImage();
27 |  | }
28 |  |
29 | 88 | public int getArrayDepth() {
30 | 88 | if (jjtGetNumChildren() != 0 && (jjtGetChild(0) instanceof ASTReferenceType || jjtGetChild(0) instanceof ASTPrimitiveType)) {
31 | 88 | return ((Dimensionable) jjtGetChild(0)).getArrayDepth();
32 |  | }
33 | 0 | throw new RuntimeException("ASTType.getArrayDepth called, but first child (of " + jjtGetNumChildren() + " total children) is neither a primitive nor a reference type.");
34 |  | }
35 |  |
36 | 10 | public boolean isArray() {
37 | 10 | return getArrayDepth() > 0;
38 |  | }
39 |  |
40 |  |
41 |  | }