01: package org.jacorb.idl;
02:
03: /*
04: * JacORB - a free Java ORB
05: *
06: * Copyright (C) 1997-2004 Gerald Brose.
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Library General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Library General Public License for more details.
17: *
18: * You should have received a copy of the GNU Library General Public
19: * License along with this library; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: */
22:
23: import java.io.PrintWriter;
24: import java.util.*;
25:
26: /**
27: * @author Gerald Brose
28: * @version $Id: Spec.java,v 1.13 2004/05/06 12:39:58 nicolas Exp $
29: */
30:
31: public class Spec extends IdlSymbol {
32: public Vector definitions;
33:
34: public Spec(int num) {
35: super (num);
36: definitions = new Vector();
37: }
38:
39: public void parse() {
40: Enumeration e = definitions.elements();
41: for (; e.hasMoreElements();)
42: ((IdlSymbol) e.nextElement()).parse();
43: }
44:
45: public void setPackage(String s) {
46: s = parser.pack_replace(s);
47: Enumeration e = definitions.elements();
48: while (e.hasMoreElements()) {
49: IdlSymbol i = (IdlSymbol) e.nextElement();
50: i.setPackage(s);
51: }
52: }
53:
54: public void print(PrintWriter ps) {
55: Enumeration e = definitions.elements();
56: while (e.hasMoreElements())
57: ((IdlSymbol) e.nextElement()).print(ps);
58: }
59:
60: /**
61: */
62:
63: public void accept(IDLTreeVisitor visitor) {
64: visitor.visitSpec(this);
65: }
66:
67: }
|