Inspector | Message | Severity | Location |
---|---|---|---|
Java Inspector 048 | Copyrights information should be present in each file. | 1 | |
Java Inspector 089 | Type is not documented | 2 | 31:1 |
Java Inspector 089 | Method is not properly documented | 2 | 43:9 |
Java Inspector 089 | Method is not properly documented | 2 | 50:9 |
Java Inspector 089 | Constructor is not properly documented | 2 | 59:9 |
Java Inspector 089 | Method is not properly documented | 2 | 66:9 |
Java Inspector 089 | Method is not properly documented | 2 | 73:9 |
Java Inspector 089 | Method is not properly documented | 2 | 80:9 |
Java Inspector 089 | Method is not properly documented | 2 | 87:9 |
Java Inspector 089 | Method is not properly documented | 2 | 94:9 |
Java Inspector 089 | Method is not properly documented | 2 | 101:9 |
Java Inspector 089 | Constructor is not properly documented | 2 | 110:9 |
Java Inspector 089 | Parameter column is not documented | 2 | 110:9 |
Java Inspector 089 | Parameter line is not documented | 2 | 110:9 |
Java Inspector 089 | Parameter sourceURL is not documented | 2 | 110:9 |
Java Inspector 089 | Undocumented parameter id | 2 | 110:9 |
Java Inspector 089 | Undocumented constructor | 2 | 118:9 |
Java Inspector 089 | Undocumented method | 2 | 129:9 |
Java Inspector 089 | Undocumented method | 2 | 137:9 |
Java Inspector 089 | Undocumented method | 2 | 141:9 |
Java Inspector 040 | Parameter name id clashes with field name in SimpleSourceMarker | 3 | 50:33 |
Java Inspector 051 | It is good practice to call in any case super() in a constructor. | 3 | 118:9 |
Java Inspector 054 | Discourage usage of instance variables like a, j by enforcing minimal variable name length (3). | 3 | 38:9 |
Java Inspector 090 | Unnecessary else part in if. The main part terminates control flow (return, break, throw, or continue). | 3 | 130:17 |
1/*
2 * hgcommons 9
3 * Hammurapi Group Common Library
4 * Copyright (C) 2003 Hammurapi Group
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * URL: http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/hammurapi-group/products/products/hgcommons/index.html
21 * e-Mail: support@hammurapi.biz
22 */
23package biz.hammurapi.legacy.review;
24
25import java.io.Serializable;
26
27/**
28 * @author Pavel Vlasov
29 * @version $Revision: 1.3 $
30 */
31public class SimpleSourceMarker implements SourceMarker, Signed, Comparable, Serializable {
32 /**
33 * Comment for <code>serialVersionUID</code>
34 */
35 private static final long serialVersionUID = 8717158207915979L;
36 private int column;
37 private int line;
38 private Integer id;
39
40 /**
41 * @return Returns the id.
42 */
43 public Integer getSourceId() {
44 return id;
45 }
46
47 /**
48 * @param id The id to set.
49 */
50 public void setSourceId(Integer id) {
51 this.id = id;
52 }
53 private String sourceURL;
54 private String signature;
55
56 /**
57 *
58 */
59 public SimpleSourceMarker() {
60 super();
61 }
62
63 /**
64 * @return Returns the column.
65 */
66 public int getColumn() {
67 return column;
68 }
69
70 /**
71 * @param column The column to set.
72 */
73 public void setColumn(int column) {
74 this.column = column;
75 }
76
77 /**
78 * @return Returns the line.
79 */
80 public int getLine() {
81 return line;
82 }
83
84 /**
85 * @param line The line to set.
86 */
87 public void setLine(int line) {
88 this.line = line;
89 }
90
91 /**
92 * @return Returns the sourceURL.
93 */
94 public String getSourceURL() {
95 return sourceURL;
96 }
97
98 /**
99 * @param sourceURL The sourceURL to set.
100 */
101 public void setSourceURL(String sourceURL) {
102 this.sourceURL = sourceURL;
103 }
104
105 /**
106 * @param column
107 * @param line
108 * @param sourceURL
109 */
110 public SimpleSourceMarker(int column, int line, String sourceURL, Integer id) {
111 super();
112 this.column = column;
113 this.line = line;
114 this.sourceURL = sourceURL;
115 this.id=id;
116 }
117
118 public SimpleSourceMarker(SourceMarker sourceMarker) {
119 this.column=sourceMarker.getColumn();
120 this.line=sourceMarker.getLine();
121 this.sourceURL=sourceMarker.getSourceURL();
122 this.id=sourceMarker.getSourceId();
123
124 if (sourceMarker instanceof Signed) {
125 this.signature=((Signed) sourceMarker).getSignature();
126 }
127 }
128
129 public int compareTo(Object o) {
130 if (o instanceof SourceMarker) {
131 return SourceMarkerComparator._compare(this, o);
132 } else {
133 return 1;
134 }
135 }
136
137 public String getSignature() {
138 return signature;
139 }
140
141 public void setSignature(String signature) {
142 this.signature = signature;
143 }
144}
145