DefaultSymtabFactory.java revision 673:6b017d166ac2
1/*
2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25/*
26 * COMPONENT_NAME: idl.parser
27 *
28 * ORIGINS: 27
29 *
30 * Licensed Materials - Property of IBM
31 * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
32 * RMI-IIOP v1.0
33 *
34 */
35
36package com.sun.tools.corba.se.idl;
37
38// NOTES:
39
40/**
41 * This factory constructs the default symbol table entries, namely,
42 * those declared within the package com.sun.tools.corba.se.idl.
43 **/
44public class DefaultSymtabFactory implements SymtabFactory
45{
46  public AttributeEntry attributeEntry ()
47  {
48    return new AttributeEntry ();
49  } // attributeEntry
50
51  public AttributeEntry attributeEntry (InterfaceEntry container, IDLID id)
52  {
53    return new AttributeEntry (container, id);
54  } // attributeEntry
55
56  public ConstEntry constEntry ()
57  {
58    return new ConstEntry ();
59  } // constEntry
60
61  public ConstEntry constEntry (SymtabEntry container, IDLID id)
62  {
63    return new ConstEntry (container, id);
64  } // constEntry
65
66  public NativeEntry nativeEntry ()
67  {
68    return new NativeEntry ();
69  } // interfaceEntry
70
71  public NativeEntry nativeEntry (SymtabEntry container, IDLID id)
72  {
73    return new NativeEntry (container, id);
74  } // interfaceEntry
75
76  public EnumEntry enumEntry ()
77  {
78    return new EnumEntry ();
79  } // enumEntry
80
81  public EnumEntry enumEntry (SymtabEntry container, IDLID id)
82  {
83    return new EnumEntry (container, id);
84  } // enumEntry
85
86  public ExceptionEntry exceptionEntry ()
87  {
88    return new ExceptionEntry ();
89  } // exceptionEntry
90
91  public ExceptionEntry exceptionEntry (SymtabEntry container, IDLID id)
92  {
93    return new ExceptionEntry (container, id);
94  } // exceptionEntry
95
96  public ForwardEntry forwardEntry ()
97  {
98    return new ForwardEntry ();
99  } // forwardEntry
100
101  public ForwardEntry forwardEntry (ModuleEntry container, IDLID id)
102  {
103    return new ForwardEntry (container, id);
104  } // forwardEntry
105
106  public ForwardValueEntry forwardValueEntry ()
107  {
108    return new ForwardValueEntry ();
109  } // forwardValueEntry
110
111  public ForwardValueEntry forwardValueEntry (ModuleEntry container, IDLID id)
112  {
113    return new ForwardValueEntry (container, id);
114  } // forwardValueEntry
115
116  public IncludeEntry includeEntry ()
117  {
118    return new IncludeEntry ();
119  } // includeEntry
120
121  public IncludeEntry includeEntry (SymtabEntry container)
122  {
123    return new IncludeEntry (container);
124  } // includeEntry
125
126  public InterfaceEntry interfaceEntry ()
127  {
128    return new InterfaceEntry ();
129  } // interfaceEntry
130
131  public InterfaceEntry interfaceEntry (ModuleEntry container, IDLID id)
132  {
133    return new InterfaceEntry (container, id);
134  } // interfaceEntry
135
136  public ValueEntry valueEntry ()
137  {
138    return new ValueEntry ();
139  } // valueEntry
140
141  public ValueEntry valueEntry (ModuleEntry container, IDLID id)
142  {
143    return new ValueEntry (container, id);
144  } // valueEntry
145
146  public ValueBoxEntry valueBoxEntry ()
147  {
148    return new ValueBoxEntry ();
149  } // valueBoxEntry
150
151  public ValueBoxEntry valueBoxEntry (ModuleEntry container, IDLID id)
152  {
153    return new ValueBoxEntry (container, id);
154  } // valueBoxEntry
155
156  public MethodEntry methodEntry ()
157  {
158    return new MethodEntry ();
159  } // methodEntry
160
161  public MethodEntry methodEntry (InterfaceEntry container, IDLID id)
162  {
163    return new MethodEntry (container, id);
164  } // methodEntry
165
166  public ModuleEntry moduleEntry ()
167  {
168    return new ModuleEntry ();
169  } // moduleEntry
170
171  public ModuleEntry moduleEntry (ModuleEntry container, IDLID id)
172  {
173    return new ModuleEntry (container, id);
174  } // moduleEntry
175
176  public ParameterEntry parameterEntry ()
177  {
178    return new ParameterEntry ();
179  } // parameterEntry
180
181  public ParameterEntry parameterEntry (MethodEntry container, IDLID id)
182  {
183    return new ParameterEntry (container, id);
184  } // parameterEntry
185
186  public PragmaEntry pragmaEntry ()
187  {
188    return new PragmaEntry ();
189  } // pragmaEntry
190
191  public PragmaEntry pragmaEntry (SymtabEntry container)
192  {
193    return new PragmaEntry (container);
194  } // pragmaEntry
195
196  public PrimitiveEntry primitiveEntry ()
197  {
198    return new PrimitiveEntry ();
199  } // primitiveEntry
200
201  /** "name" can be, but is not limited to, the primitive idl type names:
202      'char', 'octet', 'short', 'long', etc.  The reason it is not limited
203      to these is that, as an extender, you may wish to override these names.
204      For instance, when generating Java code, octet translates to byte, so
205      there is an entry in Compile.overrideNames: {@code <"octet", "byte">} and a
206      PrimitiveEntry in the symbol table for "byte". */
207  public PrimitiveEntry primitiveEntry (String name)
208  {
209    return new PrimitiveEntry (name);
210  } // primitiveEntry
211
212  public SequenceEntry sequenceEntry ()
213  {
214    return new SequenceEntry ();
215  } // sequenceEntry
216
217  public SequenceEntry sequenceEntry (SymtabEntry container, IDLID id)
218  {
219    return new SequenceEntry (container, id);
220  } // sequenceEntry
221
222  public StringEntry stringEntry ()
223  {
224    return new StringEntry ();
225  } // stringEntry
226
227  public StructEntry structEntry ()
228  {
229    return new StructEntry ();
230  } // structEntry
231
232  public StructEntry structEntry (SymtabEntry container, IDLID id)
233  {
234    return new StructEntry (container, id);
235  } // structEntry
236
237  public TypedefEntry typedefEntry ()
238  {
239    return new TypedefEntry ();
240  } // typedefEntry
241
242  public TypedefEntry typedefEntry (SymtabEntry container, IDLID id)
243  {
244    return new TypedefEntry (container, id);
245  } // typedefEntry
246
247  public UnionEntry unionEntry ()
248  {
249    return new UnionEntry ();
250  } // unionEntry
251
252  public UnionEntry unionEntry (SymtabEntry container, IDLID id)
253  {
254    return new UnionEntry (container, id);
255  } // unionEntry
256
257} // interface DefaultSymtabFactory
258