Class ConstGen
java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.ConstGen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidClose the print stream, causing the file to be written.voidgenerate(Hashtable symbolTable, ConstEntry c, PrintWriter s) Generate Java code for an IDL constant.protected voidGenerate the class defining the constant.protected voidinit()Initialize members unique to this generator.protected voidOpen a new print stream only if the constant is not a member of an interface.protected voidWrite the constant expression and any comment, if present.protected voidGenerate any last words and close the class.protected voidWrite the entire constant expression and any comment, if present.private voidwriteConstValue(SymtabEntry type) Write the constant's value according to its type.protected voidWrite 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.
-