001: /*
002: * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025: /*
026: * COMPONENT_NAME: idl.parser
027: *
028: * ORIGINS: 27
029: *
030: * Licensed Materials - Property of IBM
031: * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
032: * RMI-IIOP v1.0
033: *
034: * @(#)DefaultSymtabFactory.java 1.21 07/05/05
035: */
036:
037: package com.sun.tools.corba.se.idl;
038:
039: // NOTES:
040:
041: /**
042: * This factory constructs the default symbol table entries, namely,
043: * those declared within the package com.sun.tools.corba.se.idl.
044: **/
045: public class DefaultSymtabFactory implements SymtabFactory {
046: public AttributeEntry attributeEntry() {
047: return new AttributeEntry();
048: } // attributeEntry
049:
050: public AttributeEntry attributeEntry(InterfaceEntry container,
051: IDLID id) {
052: return new AttributeEntry(container, id);
053: } // attributeEntry
054:
055: public ConstEntry constEntry() {
056: return new ConstEntry();
057: } // constEntry
058:
059: public ConstEntry constEntry(SymtabEntry container, IDLID id) {
060: return new ConstEntry(container, id);
061: } // constEntry
062:
063: public NativeEntry nativeEntry() {
064: return new NativeEntry();
065: } // interfaceEntry
066:
067: public NativeEntry nativeEntry(SymtabEntry container, IDLID id) {
068: return new NativeEntry(container, id);
069: } // interfaceEntry
070:
071: public EnumEntry enumEntry() {
072: return new EnumEntry();
073: } // enumEntry
074:
075: public EnumEntry enumEntry(SymtabEntry container, IDLID id) {
076: return new EnumEntry(container, id);
077: } // enumEntry
078:
079: public ExceptionEntry exceptionEntry() {
080: return new ExceptionEntry();
081: } // exceptionEntry
082:
083: public ExceptionEntry exceptionEntry(SymtabEntry container, IDLID id) {
084: return new ExceptionEntry(container, id);
085: } // exceptionEntry
086:
087: public ForwardEntry forwardEntry() {
088: return new ForwardEntry();
089: } // forwardEntry
090:
091: public ForwardEntry forwardEntry(ModuleEntry container, IDLID id) {
092: return new ForwardEntry(container, id);
093: } // forwardEntry
094:
095: public ForwardValueEntry forwardValueEntry() {
096: return new ForwardValueEntry();
097: } // forwardValueEntry
098:
099: public ForwardValueEntry forwardValueEntry(ModuleEntry container,
100: IDLID id) {
101: return new ForwardValueEntry(container, id);
102: } // forwardValueEntry
103:
104: public IncludeEntry includeEntry() {
105: return new IncludeEntry();
106: } // includeEntry
107:
108: public IncludeEntry includeEntry(SymtabEntry container) {
109: return new IncludeEntry(container);
110: } // includeEntry
111:
112: public InterfaceEntry interfaceEntry() {
113: return new InterfaceEntry();
114: } // interfaceEntry
115:
116: public InterfaceEntry interfaceEntry(ModuleEntry container, IDLID id) {
117: return new InterfaceEntry(container, id);
118: } // interfaceEntry
119:
120: public ValueEntry valueEntry() {
121: return new ValueEntry();
122: } // valueEntry
123:
124: public ValueEntry valueEntry(ModuleEntry container, IDLID id) {
125: return new ValueEntry(container, id);
126: } // valueEntry
127:
128: public ValueBoxEntry valueBoxEntry() {
129: return new ValueBoxEntry();
130: } // valueBoxEntry
131:
132: public ValueBoxEntry valueBoxEntry(ModuleEntry container, IDLID id) {
133: return new ValueBoxEntry(container, id);
134: } // valueBoxEntry
135:
136: public MethodEntry methodEntry() {
137: return new MethodEntry();
138: } // methodEntry
139:
140: public MethodEntry methodEntry(InterfaceEntry container, IDLID id) {
141: return new MethodEntry(container, id);
142: } // methodEntry
143:
144: public ModuleEntry moduleEntry() {
145: return new ModuleEntry();
146: } // moduleEntry
147:
148: public ModuleEntry moduleEntry(ModuleEntry container, IDLID id) {
149: return new ModuleEntry(container, id);
150: } // moduleEntry
151:
152: public ParameterEntry parameterEntry() {
153: return new ParameterEntry();
154: } // parameterEntry
155:
156: public ParameterEntry parameterEntry(MethodEntry container, IDLID id) {
157: return new ParameterEntry(container, id);
158: } // parameterEntry
159:
160: public PragmaEntry pragmaEntry() {
161: return new PragmaEntry();
162: } // pragmaEntry
163:
164: public PragmaEntry pragmaEntry(SymtabEntry container) {
165: return new PragmaEntry(container);
166: } // pragmaEntry
167:
168: public PrimitiveEntry primitiveEntry() {
169: return new PrimitiveEntry();
170: } // primitiveEntry
171:
172: /** "name" can be, but is not limited to, the primitive idl type names:
173: 'char', 'octet', 'short', 'long', etc. The reason it is not limited
174: to these is that, as an extender, you may wish to override these names.
175: For instance, when generating Java code, octet translates to byte, so
176: there is an entry in Compile.overrideNames: <"octet", "byte"> and a
177: PrimitiveEntry in the symbol table for "byte". */
178: public PrimitiveEntry primitiveEntry(String name) {
179: return new PrimitiveEntry(name);
180: } // primitiveEntry
181:
182: public SequenceEntry sequenceEntry() {
183: return new SequenceEntry();
184: } // sequenceEntry
185:
186: public SequenceEntry sequenceEntry(SymtabEntry container, IDLID id) {
187: return new SequenceEntry(container, id);
188: } // sequenceEntry
189:
190: public StringEntry stringEntry() {
191: return new StringEntry();
192: } // stringEntry
193:
194: public StructEntry structEntry() {
195: return new StructEntry();
196: } // structEntry
197:
198: public StructEntry structEntry(SymtabEntry container, IDLID id) {
199: return new StructEntry(container, id);
200: } // structEntry
201:
202: public TypedefEntry typedefEntry() {
203: return new TypedefEntry();
204: } // typedefEntry
205:
206: public TypedefEntry typedefEntry(SymtabEntry container, IDLID id) {
207: return new TypedefEntry(container, id);
208: } // typedefEntry
209:
210: public UnionEntry unionEntry() {
211: return new UnionEntry();
212: } // unionEntry
213:
214: public UnionEntry unionEntry(SymtabEntry container, IDLID id) {
215: return new UnionEntry(container, id);
216: } // unionEntry
217:
218: } // interface DefaultSymtabFactory
|