001: /* Soot - a J*va Optimization Framework
002: * Copyright (C) 2003 Jennifer Lhotak
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2.1 of the License, or (at your option) any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the
016: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
017: * Boston, MA 02111-1307, USA.
018: */
019:
020: package ca.mcgill.sable.soot.ui;
021:
022: import java.util.Vector;
023:
024: public class SootOption {
025:
026: private Vector children;
027: private String label;
028: private SootOption parent;
029: private String alias;
030:
031: public SootOption() {
032:
033: }
034:
035: /**
036: * Constructor for TreeOption.
037: */
038: public SootOption(String label, String alias) {
039: setLabel(label);
040: setAlias(alias);
041: }
042:
043: public void addChild(SootOption t) {
044: if (getChildren() == null) {
045: setChildren(new Vector());
046: }
047: t.setParent(this );
048: getChildren().add(t);
049: }
050:
051: /**
052: * Returns the children.
053: * @return Vector
054: */
055: public Vector getChildren() {
056: return children;
057: }
058:
059: /**
060: * Returns the label.
061: * @return String
062: */
063: public String getLabel() {
064: return label;
065: }
066:
067: /**
068: * Sets the children.
069: * @param children The children to set
070: */
071: public void setChildren(Vector children) {
072: this .children = children;
073: }
074:
075: /**
076: * Sets the label.
077: * @param label The label to set
078: */
079: public void setLabel(String label) {
080: this .label = label;
081: }
082:
083: /**
084: * Returns the parent.
085: * @return SootOption
086: */
087: public SootOption getParent() {
088: return parent;
089: }
090:
091: /**
092: * Sets the parent.
093: * @param parent The parent to set
094: */
095: public void setParent(SootOption parent) {
096: this .parent = parent;
097: }
098:
099: /**
100: * @return
101: */
102: public String getAlias() {
103: return alias;
104: }
105:
106: /**
107: * @param string
108: */
109: public void setAlias(String string) {
110: alias = string;
111: }
112:
113: }
|