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

file stats: | LOC: | 77 |  | Methods: | 9
| NCLOC: | 37 |  | Classes: | 1

Source file | Conditionals | Statements | Methods | TOTAL
ASTAttribute.java | 50% | 81.8% | 77.8% | 75% |

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