Class Holder

  • All Implemented Interfaces:
    AuxGen

    public class Holder
    extends java.lang.Object
    implements AuxGen
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void closeStream()
      Write the stream to file by closing the print stream.
      void generate​(java.util.Hashtable symbolTable, SymtabEntry entry)
      Generate the holder class.
      protected void init()
      Initialize variables unique to this generator.
      protected void openStream()
      Open the print stream for subsequent output.
      protected void writeBody()
      Generate members of this class.
      protected void writeClosing()
      Generate the closing statements.
      protected void writeCtors()
      Generate the constructors.
      protected void writeHeading()
      Generate the heading, including the package, imports, source comment, class statement, and left curly.
      protected void writeRead()
      Generate the _read method.
      protected void writeType()
      Generate the _type method.
      protected void writeWrite()
      Generate the _write method.
      • 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
      • holderClass

        protected java.lang.String holderClass
      • helperClass

        protected java.lang.String helperClass
      • holderType

        protected java.lang.String holderType
    • Constructor Detail

      • Holder

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

      • generate

        public void generate​(java.util.Hashtable symbolTable,
                             SymtabEntry entry)
        Generate the holder class. Provides general algorithm for auxiliary binding generation: 1.) Initialize symbol table and symbol table entry members, common to all generators. 2.) Initialize members unique to this generator. 3.) Open print stream 4.) Write class heading (package, prologue, source comment, class statement, open curly 5.) Write class body (member data and methods) 6.) Write class closing (close curly) 7.) Close the print stream
        Specified by:
        generate in interface AuxGen
      • init

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

        protected void openStream()
        Open the print stream for subsequent output.
      • writeHeading

        protected void writeHeading()
        Generate the heading, including the package, imports, source comment, class statement, and left curly.
      • writeBody

        protected void writeBody()
        Generate members of this class.
      • writeClosing

        protected void writeClosing()
        Generate the closing statements.
      • closeStream

        protected void closeStream()
        Write the stream to file by closing the print stream.
      • writeCtors

        protected void writeCtors()
        Generate the constructors.
      • writeRead

        protected void writeRead()
        Generate the _read method.
      • writeWrite

        protected void writeWrite()
        Generate the _write method.
      • writeType

        protected void writeType()
        Generate the _type method.