KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > idl > Spec


1 package org.jacorb.idl;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1997-2004 Gerald Brose.
7  *
8  * This library is free software; you can redistribute it and/or
9  * 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
24 import java.io.PrintWriter JavaDoc;
25 import java.util.*;
26
27 /**
28  * @author Gerald Brose
29  * @version $Id: Spec.java,v 1.13 2004/05/06 12:39:58 nicolas Exp $
30  */

31
32
33 public class Spec
34     extends IdlSymbol
35 {
36     public Vector definitions;
37
38     public Spec( int num )
39     {
40         super( num );
41         definitions = new Vector();
42     }
43
44     public void parse()
45     {
46         Enumeration e = definitions.elements();
47         for( ; e.hasMoreElements(); )
48             ( (IdlSymbol)e.nextElement() ).parse();
49     }
50
51     public void setPackage( String JavaDoc s )
52     {
53         s = parser.pack_replace( s );
54         Enumeration e = definitions.elements();
55         while( e.hasMoreElements() )
56         {
57             IdlSymbol i = (IdlSymbol)e.nextElement();
58             i.setPackage( s );
59         }
60     }
61
62     public void print( PrintWriter JavaDoc ps )
63     {
64         Enumeration e = definitions.elements();
65         while( e.hasMoreElements() )
66             ( (IdlSymbol)e.nextElement() ).print( ps );
67     }
68
69     /**
70      */

71
72     public void accept( IDLTreeVisitor visitor )
73     {
74         visitor.visitSpec( this );
75     }
76
77
78 }
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Popular Tags