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 Details

  • Constructor Details

    • UnionEntry

      protected UnionEntry()
    • UnionEntry

      protected UnionEntry(UnionEntry that)
    • UnionEntry

      protected UnionEntry(SymtabEntry that, IDLID clone)
  • Method Details

    • clone

      public Object clone()
      Description copied from class: SymtabEntry
      This is a shallow copy clone
      Overrides:
      clone in class SymtabEntry
    • generate

      public void generate(Hashtable symbolTable, PrintWriter stream)
      Invoke the union generator.
      Overrides:
      generate in class SymtabEntry
      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:
    • generator

      public Generator generator()
      Access the union generator.
      Overrides:
      generator in class SymtabEntry
      Returns:
      an object which implements the UnionGen interface.
      See Also:
    • addBranch

      void addBranch(UnionBranch branch)
    • branches

      public Vector<UnionBranch> branches()
      This is a vector of UnionBranch's.
      Returns:
      a Vector of UnionBranch
    • 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 - the TypedefEntry for 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:
      TypedefEntry for the default
    • addContained

      public void addContained(SymtabEntry entry)
    • contained

      public Vector<SymtabEntry> contained()
      This is a vector of SymtabEntrys. 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)