java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.EnumGen
All Implemented Interfaces:
EnumGen, Generator, JavaGenerator

public class EnumGen extends Object implements EnumGen, JavaGenerator
  • Field Details

  • Constructor Details

    • EnumGen

      public EnumGen()
      Public zero-argument constructor.
  • Method Details

    • generate

      public void generate(Hashtable symbolTable, EnumEntry e, PrintWriter s)
      Generate the Java code for an IDL enumeration.
      Specified by:
      generate in interface EnumGen
    • init

      protected void init()
      Initialize members unique to this generator.
    • openStream

      protected void openStream()
      Open the print stream to which to write the enumeration class.
    • generateHolder

      protected void generateHolder()
      Generate the holder class for this enumeration.
    • generateHelper

      protected void generateHelper()
      Generate the helper class for this enumeration.
    • writeHeading

      protected void writeHeading()
      Write the heading of the enumeration class, including the package, imports, class statement, and open curly.
    • writeBody

      protected void writeBody()
      Write the members of enumeration class.
    • writeValue

      protected void writeValue()
      Write the value method for the enumeration class.
    • writeFromInt

      protected void writeFromInt()
      Write the from_int method for the enumeration class.
    • writeCtors

      protected void writeCtors()
      Write the protected constructor for the enumeration class.
    • writeClosing

      protected void writeClosing()
      Close the enumeration class.
    • closeStream

      protected void closeStream()
      Close the print stream, which writes the stream to file.
    • helperType

      public int helperType(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream)
      Specified by:
      helperType in interface JavaGenerator
    • type

      public int type(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream)
      Specified by:
      type in interface JavaGenerator
    • helperRead

      public void helperRead(String entryName, SymtabEntry entry, PrintWriter stream)
      Specified by:
      helperRead in interface JavaGenerator
    • helperWrite

      public void helperWrite(SymtabEntry entry, PrintWriter stream)
      Specified by:
      helperWrite in interface JavaGenerator
    • read

      public int read(int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
      Specified by:
      read in interface JavaGenerator
    • write

      public int write(int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
      Specified by:
      write in interface JavaGenerator