public class UnionGen extends Object implements UnionGen, JavaGenerator
Modifier and Type | Field and Description |
---|---|
protected PrintWriter |
stream |
protected Hashtable |
symbolTable |
protected String |
typePackage |
protected UnionEntry |
u |
protected boolean |
unionIsEnum |
protected SymtabEntry |
utype |
Constructor and Description |
---|
UnionGen()
Public zero-argument constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeStream() |
void |
generate(Hashtable symbolTable,
UnionEntry u,
PrintWriter s) |
protected void |
generateContainedTypes() |
protected void |
generateHelper() |
protected void |
generateHolder() |
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() |
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() |
protected void |
writeClosing() |
protected void |
writeHeading() |
protected Hashtable symbolTable
protected UnionEntry u
protected PrintWriter stream
protected SymtabEntry utype
protected boolean unionIsEnum
protected String typePackage
public void generate(Hashtable symbolTable, UnionEntry u, PrintWriter s)
protected void init()
protected void openStream()
protected void generateHelper()
protected void generateHolder()
protected void writeHeading()
protected void writeBody()
protected void writeClosing()
protected void closeStream()
protected void generateContainedTypes()
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.