corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Holder.java
author ohair
Tue, 25 May 2010 15:52:11 -0700
changeset 5555 b2b5ed3f0d0d
parent 4 02bb8761fcce
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
/*
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     2
 * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
 *
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    23
 * questions.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
/*
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
 * COMPONENT_NAME: idl.toJava
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
 * ORIGINS: 27
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
 * Licensed Materials - Property of IBM
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
 * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
 * RMI-IIOP v1.0
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
package com.sun.tools.corba.se.idl.toJavaPortable;
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
// NOTES:
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
// -D61056   <klr> Use Util.helperName
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
import java.io.PrintWriter;
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
import com.sun.tools.corba.se.idl.GenFileStream;
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
import com.sun.tools.corba.se.idl.SymtabEntry;
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
import com.sun.tools.corba.se.idl.ValueBoxEntry;
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
import com.sun.tools.corba.se.idl.InterfaceState;
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
import com.sun.tools.corba.se.idl.TypedefEntry;
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
import com.sun.tools.corba.se.idl.StringEntry;
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
import com.sun.tools.corba.se.idl.PrimitiveEntry;
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
 **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
public class Holder implements AuxGen
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
{
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
   * Public zero-argument constructor.
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
  public Holder ()
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
  } // ctor
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
   * Generate the holder class. Provides general algorithm for
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
   * auxiliary binding generation:
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
   * 1.) Initialize symbol table and symbol table entry members,
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
   *     common to all generators.
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
   * 2.) Initialize members unique to this generator.
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
   * 3.) Open print stream
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
   * 4.) Write class heading (package, prologue, source comment, class
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
   *     statement, open curly
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
   * 5.) Write class body (member data and methods)
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
   * 6.) Write class closing (close curly)
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
   * 7.) Close the print stream
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
  public void generate (java.util.Hashtable symbolTable, com.sun.tools.corba.se.idl.SymtabEntry entry)
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
    this.symbolTable = symbolTable;
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
    this.entry       = entry;
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
    init ();
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
    openStream ();
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
    if (stream == null)
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
      return;
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
    writeHeading ();
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
    writeBody ();
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
    writeClosing ();
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
    closeStream ();
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
  } // generate
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
   * Initialize variables unique to this generator.
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
  protected void init ()
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
    holderClass = entry.name () + "Holder";
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
    helperClass = Util.helperName (entry, true); // <d61056>
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
    if (entry instanceof ValueBoxEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
      ValueBoxEntry v = (ValueBoxEntry) entry;
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
      TypedefEntry member = ((InterfaceState) v.state ().elementAt (0)).entry;
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
      SymtabEntry mType =  member.type ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
      holderType = Util.javaName (mType);
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
      holderType = Util.javaName (entry);
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
  } // init
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
   * Open the print stream for subsequent output.
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
  protected void openStream ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
    stream = Util.stream (entry, "Holder.java");
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
  } // openStream
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
   * Generate the heading, including the package, imports,
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
   * source comment, class statement, and left curly.
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
  protected void writeHeading ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
    Util.writePackage (stream, entry, Util.HolderFile);
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
    Util.writeProlog (stream, stream.name ());
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
    if (entry.comment () != null)
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
      entry.comment ().generate ("", stream);
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
    stream.println ("public final class " + holderClass + " implements org.omg.CORBA.portable.Streamable");
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
    stream.println ('{');
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
  } // writeHeading
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
   * Generate members of this class.
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
  protected void writeBody ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
    if (entry instanceof ValueBoxEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
      stream.println ("  public " + holderType + " value;");
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
      Util.writeInitializer ("  public ", "value", "", entry, stream);
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
    stream.println ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
    writeCtors ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
    writeRead ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
    writeWrite ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
    writeType ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
  } // writeBody
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
   * Generate the closing statements.
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
  protected void writeClosing ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
    stream.println ('}');
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
  } // writeClosing
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
   * Write the stream to file by closing the print stream.
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
  protected void closeStream ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
    stream.close ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
  } // closeStream
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
   * Generate the constructors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
  protected void writeCtors ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
    stream.println ("  public " + holderClass + " ()");
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
    stream.println ("  {");
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
    stream.println ("  }");
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
    stream.println ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
    stream.println ("  public " + holderClass + " (" + holderType + " initialValue)");
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
    stream.println ("  {");
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
    stream.println ("    value = initialValue;");
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
    stream.println ("  }");
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
    stream.println ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
  } // writeCtors
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
   * Generate the _read method.
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
  protected void writeRead ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
    stream.println ("  public void _read (org.omg.CORBA.portable.InputStream i)");
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
    stream.println ("  {");
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
    if (entry instanceof ValueBoxEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
      TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
      SymtabEntry mType = member.type ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
      if (mType instanceof StringEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
        stream.println ("    value = i.read_string ();");
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
      else if (mType instanceof PrimitiveEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
        stream.println ("    value = " + helperClass + ".read (i).value;");
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
        stream.println ("    value = " + helperClass + ".read (i);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
      stream.println ("    value = " + helperClass + ".read (i);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
    stream.println ("  }");
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
    stream.println ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
  } // writeRead
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
   * Generate the _write method.
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
  protected void writeWrite ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
    stream.println ("  public void _write (org.omg.CORBA.portable.OutputStream o)");
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
    stream.println ("  {");
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
    if (entry instanceof ValueBoxEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
      TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
      SymtabEntry mType = member.type ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
      if (mType instanceof StringEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
        stream.println ("    o.write_string (value);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
      else if (mType instanceof PrimitiveEntry)
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
      {
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
        String name = entry.name ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
        stream.println ("    " + name + " vb = new " + name + " (value);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
        stream.println ("    " + helperClass + ".write (o, vb);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
      }
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
        stream.println ("    " + helperClass + ".write (o, value);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
      stream.println ("    " + helperClass + ".write (o, value);");
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
    stream.println ("  }");
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
    stream.println ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
  } // writeWrite
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
   * Generate the _type method.
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
  protected void writeType ()
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
    stream.println ("  public org.omg.CORBA.TypeCode _type ()");
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
    stream.println ("  {");
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
    stream.println ("    return " + helperClass + ".type ();");
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
    stream.println ("  }");
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
    stream.println ();
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
  } // writeType
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
  protected java.util.Hashtable     symbolTable;
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
  protected com.sun.tools.corba.se.idl.SymtabEntry entry;
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
  protected GenFileStream           stream;
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
  // Unique to this generator
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
  protected String holderClass;
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
  protected String helperClass;
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
  protected String holderType;
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
} // class Holder