Class EnumGen
- java.lang.Object
-
- com.sun.tools.corba.ee.idl.toJavaPortable.EnumGen
-
- All Implemented Interfaces:
EnumGen,Generator,JavaGenerator
public class EnumGen extends java.lang.Object implements EnumGen, JavaGenerator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.StringclassNameprotected EnumEntrye(package private) java.lang.StringfullClassNameprotected java.io.PrintWriterstreamprotected java.util.HashtablesymbolTable
-
Constructor Summary
Constructors Constructor Description EnumGen()Public zero-argument constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseStream()Close the print stream, which writes the stream to file.voidgenerate(java.util.Hashtable symbolTable, EnumEntry e, java.io.PrintWriter s)Generate the Java code for an IDL enumeration.protected voidgenerateHelper()Generate the helper class for this enumeration.protected voidgenerateHolder()Generate the holder class for this enumeration.voidhelperRead(java.lang.String entryName, SymtabEntry entry, java.io.PrintWriter stream)inthelperType(int index, java.lang.String indent, TCOffsets tcoffsets, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)voidhelperWrite(SymtabEntry entry, java.io.PrintWriter stream)protected voidinit()Initialize members unique to this generator.protected voidopenStream()Open the print stream to which to write the enumeration class.intread(int index, java.lang.String indent, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)inttype(int index, java.lang.String indent, TCOffsets tcoffsets, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)intwrite(int index, java.lang.String indent, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)protected voidwriteBody()Write the members of enumeration class.protected voidwriteClosing()Close the enumeration class.protected voidwriteCtors()Write the protected constructor for the enumeration class.protected voidwriteFromInt()Write the from_int method for the enumeration class.protected voidwriteHeading()Write the heading of the enumeration class, including the package, imports, class statement, and open curly.protected voidwriteValue()Write the value method for the enumeration class.
-
-
-
Field Detail
-
symbolTable
protected java.util.Hashtable symbolTable
-
e
protected EnumEntry e
-
stream
protected java.io.PrintWriter stream
-
className
java.lang.String className
-
fullClassName
java.lang.String fullClassName
-
-
Method Detail
-
generate
public void generate(java.util.Hashtable symbolTable, EnumEntry e, java.io.PrintWriter s)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, java.lang.String indent, TCOffsets tcoffsets, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)- Specified by:
helperTypein interfaceJavaGenerator
-
type
public int type(int index, java.lang.String indent, TCOffsets tcoffsets, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)- Specified by:
typein interfaceJavaGenerator
-
helperRead
public void helperRead(java.lang.String entryName, SymtabEntry entry, java.io.PrintWriter stream)- Specified by:
helperReadin interfaceJavaGenerator
-
helperWrite
public void helperWrite(SymtabEntry entry, java.io.PrintWriter stream)
- Specified by:
helperWritein interfaceJavaGenerator
-
read
public int read(int index, java.lang.String indent, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)- Specified by:
readin interfaceJavaGenerator
-
write
public int write(int index, java.lang.String indent, java.lang.String name, SymtabEntry entry, java.io.PrintWriter stream)- Specified by:
writein interfaceJavaGenerator
-
-