Class EnumGen

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String className  
      protected EnumEntry e  
      (package private) java.lang.String fullClassName  
      protected java.io.PrintWriter stream  
      protected java.util.Hashtable symbolTable  
    • Constructor Summary

      Constructors 
      Constructor Description
      EnumGen()
      Public zero-argument constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void closeStream()
      Close the print stream, which writes the stream to file.
      void generate​(java.util.Hashtable symbolTable, EnumEntry e, java.io.PrintWriter s)
      Generate the Java code for an IDL enumeration.
      protected void generateHelper()
      Generate the helper class for this enumeration.
      protected void generateHolder()
      Generate the holder class for this enumeration.
      void helperRead​(java.lang.String entryName, SymtabEntry entry, java.io.PrintWriter stream)  
      int helperType​(int index, java.lang.String indent, TCOffsets tcoffsets, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)  
      void helperWrite​(SymtabEntry entry, java.io.PrintWriter stream)  
      protected void init()
      Initialize members unique to this generator.
      protected void openStream()
      Open the print stream to which to write the enumeration class.
      int read​(int index, java.lang.String indent, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)  
      int type​(int index, java.lang.String indent, TCOffsets tcoffsets, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)  
      int write​(int index, java.lang.String indent, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)  
      protected void writeBody()
      Write the members of enumeration class.
      protected void writeClosing()
      Close the enumeration class.
      protected void writeCtors()
      Write the protected constructor for the enumeration class.
      protected void writeFromInt()
      Write the from_int method for the enumeration class.
      protected void writeHeading()
      Write the heading of the enumeration class, including the package, imports, class statement, and open curly.
      protected void writeValue()
      Write the value method for the enumeration class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • symbolTable

        protected java.util.Hashtable symbolTable
      • stream

        protected java.io.PrintWriter stream
      • className

        java.lang.String className
      • fullClassName

        java.lang.String fullClassName
    • Constructor Detail

      • EnumGen

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

      • generate

        public void generate​(java.util.Hashtable symbolTable,
                             EnumEntry e,
                             java.io.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,
                              java.lang.String indent,
                              TCOffsets tcoffsets,
                              java.lang.String name,
                              SymtabEntry entry,
                              java.io.PrintWriter stream)
        Specified by:
        helperType in interface JavaGenerator
      • type

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

        public void helperRead​(java.lang.String entryName,
                               SymtabEntry entry,
                               java.io.PrintWriter stream)
        Specified by:
        helperRead in interface JavaGenerator
      • read

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

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