Clover coverage report - PMD - 3.9 Coverage timestamp: Tue Dec 19 2006 09:38:44 EST 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 | 15 | public String getName() {
13 | 15 | return name;
14 |  | }
15 |  |
16 |  | /**
17 |  | * @param name The name to set.
18 |  | */
19 | 28 | public void setName(String name) {
20 | 28 | 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 | 28 | public ASTAttribute(JspParser p, int id) {
67 | 28 | super(p, id);
68 |  | }
69 |  |
70 |  |
71 |  | /**
72 |  | * Accept the visitor. *
73 |  | */
74 | 9 | public Object jjtAccept(JspParserVisitor visitor, Object data) {
75 | 9 | return visitor.visit(this, data);
76 |  | }
77 |  | }