Clover coverage report - PMD - 3.7 Coverage timestamp: Wed May 31 2006 09:25:59 EDT FRAMES NO FRAMES |

file stats: | LOC: | 101 |  | Methods: | 11
| NCLOC: | 44 |  | Classes: | 1

Source file | Conditionals | Statements | Methods | TOTAL
ASTElement.java | 75% | 84.6% | 81.8% | 82.1% |

1 |  | /* Generated By:JJTree: Do not edit this line. ASTElement.java */
2 |  |
3 |  | package net.sourceforge.pmd.jsp.ast;
4 |  |
5 |  | public class ASTElement extends SimpleNode {
6 |  |
7 |  | /* BEGIN CUSTOM CODE */
8 |  |
9 |  | /**
10 |  | * Name of the element-tag. Cannot be null.
11 |  | */
12 |  | private String name;
13 |  |
14 |  | /**
15 |  | * Flag indicating that the element consists of one tag ("<... />").
16 |  | */
17 |  | private boolean empty; //
18 |  |
19 |  |
20 |  | /**
21 |  | * @return boolean - true if the element has a namespace-prefix, false otherwise
22 |  | */
23 | 1 | public boolean isHasNamespacePrefix() {
24 | 1 | return (name.indexOf(":") >= 0);
25 |  | }
26 |  |
27 |  | /**
28 |  | * @return String - the part of the name that is before the (first) colon (":")
29 |  | */
30 | 4 | public String getNamespacePrefix() {
31 | 4 | int colonIndex = name.indexOf(":");
32 | 4 | return ((colonIndex >= 0)
33 |  | ? name.substring(0, colonIndex)
34 |  | : "");
35 |  | }
36 |  |
37 |  | /**
38 |  | * @return String - The part of the name that is after the first colon (":").
39 |  | * If the name does not contain a colon, the full name is returned.
40 |  | */
41 | 1 | public String getLocalName() {
42 | 1 | int colonIndex = name.indexOf(":");
43 | 1 | return ((colonIndex >= 0)
44 |  | ? name.substring(colonIndex + 1)
45 |  | : name);
46 |  | }
47 |  |
48 |  | /**
49 |  | * @return Returns the name.
50 |  | */
51 | 43 | public String getName() {
52 | 43 | return name;
53 |  | }
54 |  |
55 |  | /**
56 |  | * @param name The name to set.
57 |  | */
58 | 100 | public void setName(String name) {
59 | 100 | this.name = name;
60 |  | }
61 |  |
62 |  | /**
63 |  | * @return Returns the empty.
64 |  | */
65 | 1 | public boolean isEmpty() {
66 | 1 | return empty;
67 |  | }
68 |  |
69 |  | /**
70 |  | * @param empty The empty to set.
71 |  | */
72 | 100 | public void setEmpty(boolean empty) {
73 | 100 | this.empty = empty;
74 |  | }
75 |  |
76 |  | /* (non-Javadoc)
77 |  | * @see com.applicationengineers.pmd4jsp.ast.SimpleNode#toString(java.lang.String)
78 |  | */
79 | 0 | public String toString(String prefix) {
80 | 0 | return super.toString(prefix) + " name=[" + name + "] ";
81 |  | }
82 |  | /* END CUSTOM CODE */
83 |  |
84 |  |
85 |  |
86 | 0 | public ASTElement(int id) {
87 | 0 | super(id);
88 |  | }
89 |  |
90 | 100 | public ASTElement(JspParser p, int id) {
91 | 100 | super(p, id);
92 |  | }
93 |  |
94 |  |
95 |  | /**
96 |  | * Accept the visitor. *
97 |  | */
98 | 33 | public Object jjtAccept(JspParserVisitor visitor, Object data) {
99 | 33 | return visitor.visit(this, data);
100 |  | }
101 |  | }