Class ConstGen
java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.ConstGen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Close the print stream, causing the file to be written.void
generate
(Hashtable symbolTable, ConstEntry c, PrintWriter s) Generate Java code for an IDL constant.protected void
Generate the class defining the constant.protected void
init()
Initialize members unique to this generator.protected void
Open a new print stream only if the constant is not a member of an interface.protected void
Write the constant expression and any comment, if present.protected void
Generate any last words and close the class.protected void
Write the entire constant expression and any comment, if present.private void
writeConstValue
(SymtabEntry type) Write the constant's value according to its type.protected void
Write the heading for the class defining the constant.
-
Field Details
-
symbolTable
-
c
-
stream
-
-
Constructor Details
-
ConstGen
public ConstGen()Public zero-argument constructor.
-
-
Method Details
-
generate
Generate Java code for an IDL constant. A constant is written to a new class only when it is not a member of an interface; otherwise it written to the interface class in which it resides. -
init
protected void init()Initialize members unique to this generator. -
generateConst
protected void generateConst()Generate the class defining the constant. -
openStream
protected void openStream()Open a new print stream only if the constant is not a member of an interface. -
writeHeading
protected void writeHeading()Write the heading for the class defining the constant. -
writeBody
protected void writeBody()Write the constant expression and any comment, if present. -
writeConstExpr
protected void writeConstExpr()Write the entire constant expression and any comment, if present. -
writeConstValue
Write the constant's value according to its type. -
writeClosing
protected void writeClosing()Generate any last words and close the class. -
closeStream
protected void closeStream()Close the print stream, causing the file to be written.
-