SymtabFactory.java revision 672:2bb058ce572e
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 * Each entry must have three ways in which it can be instantiated:
42 * <ul>
43 * <li>with no parameters;
44 * <li>cloned from a copy of itself;
45 * <li>the normal-use instantiation (usually with 2 parameters:  the container and the id of the container).
46 * </ul>
47 **/
48public interface SymtabFactory
49{
50  AttributeEntry attributeEntry ();
51  AttributeEntry attributeEntry (InterfaceEntry container, IDLID id);
52
53  ConstEntry constEntry ();
54  ConstEntry constEntry (SymtabEntry container, IDLID id);
55
56  NativeEntry nativeEntry ();
57  NativeEntry nativeEntry (SymtabEntry container, IDLID id);
58
59  EnumEntry enumEntry ();
60  EnumEntry enumEntry (SymtabEntry container, IDLID id);
61
62  ExceptionEntry exceptionEntry ();
63  ExceptionEntry exceptionEntry (SymtabEntry container, IDLID id);
64
65  ForwardEntry forwardEntry ();
66  ForwardEntry forwardEntry (ModuleEntry container, IDLID id);
67
68  ForwardValueEntry forwardValueEntry ();
69  ForwardValueEntry forwardValueEntry (ModuleEntry container, IDLID id);
70
71  IncludeEntry includeEntry ();
72  IncludeEntry includeEntry (SymtabEntry container);
73
74  InterfaceEntry interfaceEntry ();
75  InterfaceEntry interfaceEntry (ModuleEntry container, IDLID id);
76
77  ValueEntry valueEntry ();
78  ValueEntry valueEntry (ModuleEntry container, IDLID id);
79
80  ValueBoxEntry valueBoxEntry ();
81  ValueBoxEntry valueBoxEntry (ModuleEntry container, IDLID id);
82
83  MethodEntry methodEntry ();
84  MethodEntry methodEntry (InterfaceEntry container, IDLID id);
85
86  ModuleEntry moduleEntry ();
87  ModuleEntry moduleEntry (ModuleEntry container, IDLID id);
88
89  ParameterEntry parameterEntry ();
90  ParameterEntry parameterEntry (MethodEntry container, IDLID id);
91
92  PragmaEntry pragmaEntry ();
93  PragmaEntry pragmaEntry (SymtabEntry container);
94
95  PrimitiveEntry primitiveEntry ();
96  /** name can be, but is not limited to, the primitive idl type names:
97      char, octet, short, long, etc.  The reason it is not limited to
98      these is that, as an extender, you may wish to override these names.
99      For instance, when generating Java code, octet translates to byte,
100      so there is an entry in Compile.overrideNames: {@code <"octet", "byte">}
101      and a PrimitiveEntry in the symbol table for "byte". */
102  PrimitiveEntry primitiveEntry (String name);
103
104  SequenceEntry sequenceEntry ();
105  SequenceEntry sequenceEntry (SymtabEntry container, IDLID id);
106
107  StringEntry stringEntry ();
108
109  StructEntry structEntry ();
110  StructEntry structEntry (SymtabEntry container, IDLID id);
111
112  TypedefEntry typedefEntry ();
113  TypedefEntry typedefEntry (SymtabEntry container, IDLID id);
114
115  UnionEntry unionEntry ();
116  UnionEntry unionEntry (SymtabEntry container, IDLID id);
117} // interface SymtabFactory
118