Package com.sun.tools.corba.ee.idl
Class UnionEntry
- java.lang.Object
-
- com.sun.tools.corba.ee.idl.SymtabEntry
-
- com.sun.tools.corba.ee.idl.UnionEntry
-
public class UnionEntry extends SymtabEntry
This is the symbol table entry for unions.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Vector<UnionBranch>_branchesA vector of UnionBranch's.private java.util.Vector<SymtabEntry>_containedprivate TypedefEntry_defaultBranch(package private) static UnionGenunionGen-
Fields inherited from class com.sun.tools.corba.ee.idl.SymtabEntry
includeStack, maxKey, setEmit
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnionEntry()protectedUnionEntry(SymtabEntry that, IDLID clone)protectedUnionEntry(UnionEntry that)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddBranch(UnionBranch branch)voidaddContained(SymtabEntry entry)java.util.Vector<UnionBranch>branches()This is a vector of UnionBranch's.java.lang.Objectclone()This is a shallow copy clonejava.util.Vector<SymtabEntry>contained()This is a vector ofSymtabEntrys.TypedefEntrydefaultBranch()This TypedefEntry describes the type and name for the default branch.voiddefaultBranch(TypedefEntry branch)This TypedefEntry describes the type and name for the default branch.voidgenerate(java.util.Hashtable symbolTable, java.io.PrintWriter stream)Invoke the union generator.Generatorgenerator()Access the union generator.(package private) booleanhas(Expression label)(package private) booleanhas(TypedefEntry typedef)-
Methods inherited from class com.sun.tools.corba.ee.idl.SymtabEntry
comment, comment, container, container, dynamicVariable, dynamicVariable, emit, emit, enteringInclude, exitingInclude, fullName, getVariableKey, growVars, initDynamicVars, isReferencable, isReferencable, module, module, name, name, repositoryID, repositoryID, sourceFile, sourceFile, type, type, typeName, typeName
-
-
-
-
Field Detail
-
_branches
private java.util.Vector<UnionBranch> _branches
A vector of UnionBranch's.
-
_defaultBranch
private TypedefEntry _defaultBranch
-
_contained
private java.util.Vector<SymtabEntry> _contained
-
unionGen
static UnionGen unionGen
-
-
Constructor Detail
-
UnionEntry
protected UnionEntry()
-
UnionEntry
protected UnionEntry(UnionEntry that)
-
UnionEntry
protected UnionEntry(SymtabEntry that, IDLID clone)
-
-
Method Detail
-
clone
public java.lang.Object clone()
Description copied from class:SymtabEntryThis is a shallow copy clone- Overrides:
clonein classSymtabEntry
-
generate
public void generate(java.util.Hashtable symbolTable, java.io.PrintWriter stream)Invoke the union generator.- Overrides:
generatein classSymtabEntry- Parameters:
symbolTable- the symbol table is a hash table whose key is a fully qualified type name and whose value is a SymtabEntry or a subclass of SymtabEntry.stream- the stream to which the generator should sent its output.- See Also:
SymtabEntry
-
generator
public Generator generator()
Access the union generator.- Overrides:
generatorin classSymtabEntry- Returns:
- an object which implements the UnionGen interface.
- See Also:
UnionGen
-
addBranch
void addBranch(UnionBranch branch)
-
branches
public java.util.Vector<UnionBranch> branches()
This is a vector of UnionBranch's.- Returns:
- a
VectorofUnionBranch
-
defaultBranch
public void defaultBranch(TypedefEntry branch)
This TypedefEntry describes the type and name for the default branch. Like the entries in the branches vector, only the type and name fields are pertinent.- Parameters:
branch- theTypedefEntryfor the default
-
defaultBranch
public TypedefEntry defaultBranch()
This TypedefEntry describes the type and name for the default branch. Like the entries in the branches vector, only the type and name fields are pertinent.- Returns:
TypedefEntryfor the default
-
addContained
public void addContained(SymtabEntry entry)
-
contained
public java.util.Vector<SymtabEntry> contained()
This is a vector ofSymtabEntrys. It itemizes any types which this union contains. For example:union A switch (long) { case 0: long x; case 1: Struct B { long a; long b; } y; }Struct B is contained within union A.- Returns:
- a Vector of
SymtabEntrys contained within
-
has
boolean has(Expression label)
-
has
boolean has(TypedefEntry typedef)
-
-