01: /*
02: * Hammurapi
03: * Automated Java code review system.
04: * Copyright (C) 2004 Hammurapi Group
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (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
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; 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.org
21: * e-Mail: support@hammurapi.biz
22: */
23: package org.hammurapi.util;
24:
25: import java.util.StringTokenizer;
26:
27: import com.pavelvlasov.util.Visitable;
28: import com.pavelvlasov.util.Visitor;
29:
30: /**
31: * @author Pavel Vlasov
32: * @version $Revision: 1.1 $
33: */
34: public class InspectorModel implements Visitable {
35:
36: public InspectorModel(String line) {
37: StringTokenizer st = new StringTokenizer(line, "\t");
38: name = st.nextToken();
39: className = st.nextToken();
40: type = st.nextToken();
41: interfaceName = st.nextToken();
42: severity = st.nextToken();
43: parameterizable = "+".equals(st.nextToken());
44: description = st.nextToken();
45: }
46:
47: public boolean accept(Visitor visitor) {
48: return visitor.visit(this );
49: }
50:
51: private String name;
52: private String className;
53: private String type;
54: private String interfaceName;
55: private String severity;
56: private boolean parameterizable;
57: private String description;
58:
59: public String getClassName() {
60: return className;
61: }
62:
63: public String getDescription() {
64: return description;
65: }
66:
67: public String getInterfaceName() {
68: return interfaceName;
69: }
70:
71: public String getName() {
72: return name;
73: }
74:
75: public boolean isParameterizable() {
76: return parameterizable;
77: }
78:
79: public String getSeverity() {
80: return severity;
81: }
82:
83: public String getType() {
84: return type;
85: }
86:
87: }
|