Class EnumGen
java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.EnumGen
- All Implemented Interfaces:
EnumGen
,Generator
,JavaGenerator
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String
protected EnumEntry
(package private) String
protected PrintWriter
protected Hashtable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Close the print stream, which writes the stream to file.void
generate
(Hashtable symbolTable, EnumEntry e, PrintWriter s) Generate the Java code for an IDL enumeration.protected void
Generate the helper class for this enumeration.protected void
Generate the holder class for this enumeration.void
helperRead
(String entryName, SymtabEntry entry, PrintWriter stream) int
helperType
(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) void
helperWrite
(SymtabEntry entry, PrintWriter stream) protected void
init()
Initialize members unique to this generator.protected void
Open the print stream to which to write the enumeration class.int
read
(int index, String indent, String name, SymtabEntry entry, PrintWriter stream) int
type
(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) int
write
(int index, String indent, String name, SymtabEntry entry, PrintWriter stream) protected void
Write the members of enumeration class.protected void
Close the enumeration class.protected void
Write the protected constructor for the enumeration class.protected void
Write the from_int method for the enumeration class.protected void
Write the heading of the enumeration class, including the package, imports, class statement, and open curly.protected void
Write the value method for the enumeration class.
-
Field Details
-
Constructor Details
-
EnumGen
public EnumGen()Public zero-argument constructor.
-
-
Method Details
-
generate
Generate the Java code for an IDL enumeration. -
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 interfaceJavaGenerator
-
type
public int type(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) - Specified by:
type
in interfaceJavaGenerator
-
helperRead
- Specified by:
helperRead
in interfaceJavaGenerator
-
helperWrite
- Specified by:
helperWrite
in interfaceJavaGenerator
-
read
- Specified by:
read
in interfaceJavaGenerator
-
write
- Specified by:
write
in interfaceJavaGenerator
-