Class InterfaceGen

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

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

  • Constructor Details

    • InterfaceGen

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

    • generate

      public void generate(Hashtable symbolTable, InterfaceEntry i, PrintWriter stream)
      Generate the interface and all the files associated with it. Provides general algorithm for binding generation: 1.) Initialize symbol table and symbol table entry members, common to all generators. 2.) Generate the skeleton if required by calling generateSkeletn () 3.) Generate the holder by calling generateHolder () 4.) Generate the helper by calling generateHelper () 5.) Generate the stub if required by calling generateStub () 6.) Generate the interface by calling generateInterface ()
      Specified by:
      generate in interface InterfaceGen
    • init

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

      protected void generateSkeleton()
      Generate a Skeleton when the user does not want just the client-side code.
    • generateStub

      protected void generateStub()
      Generate a Stub when the user does not want just the server-side code.
    • generateHelper

      protected void generateHelper()
      Generate a Helper when the user does not want just the server-side code.
    • generateHolder

      protected void generateHolder()
      Generate a Holder when the user does not want just the server-side code.
    • generateInterface

      private void generateInterface()
      Generate the interface. Provides general algorithm for binding generation: 1.) Initialize members unique to this generator. - init () 2.) Open print stream - openStream () 3.) Write class heading (package, prologue, class statement, open curly - writeHeading () 4.) Write class body (member data and methods) - write*Body () 5.) Write class closing (close curly) - writeClosing () 6.) Close the print stream - closeStream () For CORBA 2.3, interfaces are mapped to Operations and Signature interfaces. The Operations interface contains the method definitions. The Signature interface extends the Operations interface and adds CORBA::Object.
    • openStream

      protected void openStream()
    • writeHeading

      protected void writeHeading()
    • writeSignatureHeading

      protected void writeSignatureHeading()
    • writeOperationsHeading

      protected void writeOperationsHeading()
    • writeOperationsBody

      protected void writeOperationsBody()
    • writeSignatureBody

      protected void writeSignatureBody()
    • writeClosing

      protected void writeClosing()
    • closeStream

      protected void closeStream()
    • 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
    • isPseudo

      private boolean isPseudo(InterfaceEntry i)
      Returns:
      true if the entry is for a CORBA pseudo-object.