01: /*
02: * ClassStructure.java Copyright (c) 2006,07 Swaroop Belur
03: *
04: * This program is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU General Public License
06: * as published by the Free Software Foundation; either version 2
07: * of the License, or (at your option) any later version.
08:
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13:
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17: *
18: */
19:
20: package net.sf.jdec.util;
21:
22: import java.util.ArrayList;
23: import java.util.HashMap;
24:
25: /**
26: *
27: * @author sbelur
28: */
29: public class ClassStructure {
30:
31: private ArrayList methods = new ArrayList();
32: private HashMap associatedsearches = new HashMap();
33: private ArrayList innerclasses = new ArrayList();
34: private HashMap innerClassMap = new HashMap();
35: private String name = null;
36: private ClassStructure parent = null;
37:
38: public void setParent(ClassStructure parent) {
39: this .parent = parent;
40: }
41:
42: public ClassStructure getParent() {
43: return parent;
44: }
45:
46: public String getSearchString(String s) {
47:
48: return (String) associatedsearches.get(s);
49:
50: }
51:
52: public void addAssociatedSearch(String s, String s1) {
53: associatedsearches.put(s, s1);
54: }
55:
56: /** Creates a new genericFinder of ClassStructure */
57: public ClassStructure() {
58:
59: }
60:
61: public ArrayList getInnerclasses() {
62: return innerclasses;
63: }
64:
65: public ArrayList getMethods() {
66: return methods;
67: }
68:
69: public void setMethods(ArrayList methods) {
70: this .methods = methods;
71: }
72:
73: public void setName(String name) {
74: this .name = name;
75: }
76:
77: public String getName() {
78: return name;
79: }
80:
81: public void addInnerClass(ClassStructure structure) {
82: innerclasses.add(structure);
83: innerClassMap.put(structure.getName(), structure);
84: }
85:
86: }
|