KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > util > InspectorModel


1 /*
2  * Hammurapi
3  * Automated Java code review system.
4  * Copyright (C) 2004 Hammurapi Group
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (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 JavaDoc;
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 JavaDoc line) {
37         StringTokenizer JavaDoc st=new StringTokenizer JavaDoc(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 JavaDoc name;
52     private String JavaDoc className;
53     private String JavaDoc type;
54     private String JavaDoc interfaceName;
55     private String JavaDoc severity;
56     private boolean parameterizable;
57     private String JavaDoc description;
58     
59     public String JavaDoc getClassName() {
60         return className;
61     }
62
63     public String JavaDoc getDescription() {
64         return description;
65     }
66
67     public String JavaDoc getInterfaceName() {
68         return interfaceName;
69     }
70
71     public String JavaDoc getName() {
72         return name;
73     }
74
75     public boolean isParameterizable() {
76         return parameterizable;
77     }
78
79     public String JavaDoc getSeverity() {
80         return severity;
81     }
82
83     public String JavaDoc getType() {
84         return type;
85     }
86
87 }
88
Popular Tags