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

file stats: | LOC: | 55 |  | Methods: | 6
| NCLOC: | 32 |  | Classes: | 1

Source file | Conditionals | Statements | Methods | TOTAL

SourceType.java

50%

70%

83.3%

70%

1 |  | package net.sourceforge.pmd;
2 |  |
3 |  | /**
4 |  | * Enumeration of the types of source code.
5 |  | *
6 |  | * @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
7 |  | */
8 |  | public final class SourceType {
9 |  | public static final SourceType JAVA_13 = new SourceType("java 1.3");
10 |  | public static final SourceType JAVA_14 = new SourceType("java 1.4");
11 |  | public static final SourceType JAVA_15 = new SourceType("java 1.5");
12 |  | public static final SourceType JSP = new SourceType("jsp");
13 |  |
14 |  | private String id;
15 |  |
16 |  | /**
17 |  | * Private constructor.
18 |  | *
19 |  | * @param id
20 |  | */
21 | 804 | private SourceType(String id) {
22 | 804 | setId(id);
23 |  | }
24 |  |
25 | 8183 | public String getId() {
26 | 8183 | return id;
27 |  | }
28 |  |
29 | 804 | private void setId(String id) {
30 | 804 | this.id = id;
31 |  | }
32 |  |
33 | 3 | public boolean equals(Object other) {
34 | 3 | if (other == null) {
35 | 0 | return false;
36 |  | }
37 |  |
38 | 3 | if (other instanceof SourceType) {
39 | 3 | return ((SourceType) other).getId().equals(getId());
40 |  | }
41 |  |
42 | 0 | return false;
43 |  | }
44 |  |
45 | 8177 | public int hashCode() {
46 | 8177 | return getId().hashCode();
47 |  | }
48 |  |
49 |  | /* (non-Javadoc)
50 |  | * @see java.lang.Object#toString()
51 |  | */
52 | 0 | public String toString() {
53 | 0 | return "SourceType [" + getId() + "]";
54 |  | }
55 |  | }