TypeCode discTC = getTypeCode(orb, unionType.getDiscriminator(), typeMap, seenTypes);
Map<String, UnionMember> members = new LinkedHashMap<String, UnionMember>();
List<Unionbranch> branches = unionType.getUnionbranch();
for (Iterator<Unionbranch> branchIter = branches.iterator(); branchIter.hasNext();) {
Unionbranch branch = branchIter.next();
List<CaseType> cases = branch.getCase();
for (Iterator<CaseType> caseIter = cases.iterator(); caseIter.hasNext();) {
CaseType cs = caseIter.next();
if (!members.containsKey(cs.getLabel())) {
UnionMember member = new UnionMember();
member.name = branch.getName();
member.type = getTypeCode(orb, branch.getIdltype(), typeMap, seenTypes);
member.label = orb.create_any();
// We need to insert the labels in a way that depends on the type of the
// discriminator. According to the CORBA specification, the following types
// are permissable as discriminator types:
// * signed & unsigned short