KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > soot > ui > SootOption


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2003 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20 package ca.mcgill.sable.soot.ui;
21
22 import java.util.Vector JavaDoc;
23
24 public class SootOption {
25
26     private Vector JavaDoc children;
27     private String JavaDoc label;
28     private SootOption parent;
29     private String JavaDoc alias;
30     
31     public SootOption() {
32     
33     }
34     
35     /**
36      * Constructor for TreeOption.
37      */

38     public SootOption(String JavaDoc label, String JavaDoc alias) {
39         setLabel(label);
40         setAlias(alias);
41     }
42     
43     public void addChild(SootOption t) {
44         if (getChildren() == null) {
45             setChildren(new Vector JavaDoc());
46         }
47         t.setParent(this);
48         getChildren().add(t);
49     }
50     
51
52     /**
53      * Returns the children.
54      * @return Vector
55      */

56     public Vector JavaDoc getChildren() {
57         return children;
58     }
59
60     /**
61      * Returns the label.
62      * @return String
63      */

64     public String JavaDoc getLabel() {
65         return label;
66     }
67
68     /**
69      * Sets the children.
70      * @param children The children to set
71      */

72     public void setChildren(Vector JavaDoc children) {
73         this.children = children;
74     }
75
76     /**
77      * Sets the label.
78      * @param label The label to set
79      */

80     public void setLabel(String JavaDoc label) {
81         this.label = label;
82     }
83
84     /**
85      * Returns the parent.
86      * @return SootOption
87      */

88     public SootOption getParent() {
89         return parent;
90     }
91
92     /**
93      * Sets the parent.
94      * @param parent The parent to set
95      */

96     public void setParent(SootOption parent) {
97         this.parent = parent;
98     }
99
100     /**
101      * @return
102      */

103     public String JavaDoc getAlias() {
104         return alias;
105     }
106
107     /**
108      * @param string
109      */

110     public void setAlias(String JavaDoc string) {
111         alias = string;
112     }
113
114 }
115
Popular Tags