public class EnumGen extends Object implements EnumGen, JavaGenerator
Modifier and Type | Field and Description |
---|---|
protected EnumEntry |
e |
protected PrintWriter |
stream |
protected Hashtable |
symbolTable |
Constructor and Description |
---|
EnumGen()
Public zero-argument constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeStream()
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 |
generateHelper()
Generate the helper class for this enumeration.
|
protected void |
generateHolder()
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 |
openStream()
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 |
writeBody()
Write the members of enumeration class.
|
protected void |
writeClosing()
Close the enumeration class.
|
protected void |
writeCtors()
Write the protected constructor for the enumeration class.
|
protected void |
writeFromInt()
Write the from_int method for the enumeration class.
|
protected void |
writeHeading()
Write the heading of the enumeration class, including the package,
imports, class statement, and open curly.
|
protected void |
writeValue()
Write the value method for the enumeration class.
|
protected Hashtable symbolTable
protected EnumEntry e
protected PrintWriter stream
public void generate(Hashtable symbolTable, EnumEntry e, PrintWriter s)
protected void init()
protected void openStream()
protected void generateHolder()
protected void generateHelper()
protected void writeHeading()
protected void writeBody()
protected void writeValue()
protected void writeFromInt()
protected void writeCtors()
protected void writeClosing()
protected void closeStream()
public int helperType(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream)
helperType
in interface JavaGenerator
public int type(int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream)
type
in interface JavaGenerator
public void helperRead(String entryName, SymtabEntry entry, PrintWriter stream)
helperRead
in interface JavaGenerator
public void helperWrite(SymtabEntry entry, PrintWriter stream)
helperWrite
in interface JavaGenerator
public int read(int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
read
in interface JavaGenerator
public int write(int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
write
in interface JavaGenerator
Copyright © 2020 JBoss by Red Hat. All rights reserved.