1 21 package org.jacorb.ir.gui.typesystem.remote; 22 23 import org.omg.CORBA.*; 24 import org.jacorb.ir.gui.typesystem.*; 25 26 30 public class IRUnion 31 extends IRNode 32 implements AbstractContainer 33 { 34 35 38 protected IRUnion() { 39 super(); 40 } 41 45 protected IRUnion(org.omg.CORBA.IRObject irObject) { 46 super(irObject); 47 } 48 51 public org.jacorb.ir.gui.typesystem.ModelParticipant[] contents() 52 { 53 UnionDef unionDef = 54 UnionDefHelper.narrow((org.omg.CORBA.Object )this.irObject); 55 UnionMember[] members = unionDef.members(); 56 Contained[] contents = unionDef.contents( org.omg.CORBA.DefinitionKind.dk_all, false); 57 58 org.jacorb.ir.gui.typesystem.TypeSystemNode[] result = 59 new org.jacorb.ir.gui.typesystem.TypeSystemNode[members.length + contents.length]; 60 for (int i=0; i<members.length; i++) { 61 result[i] = RemoteTypeSystem.createTypeSystemNode(members[i]); 62 } 63 for (int i = 0; i < contents.length; i++) 64 { 65 result[members.length + i] = 66 RemoteTypeSystem.createTypeSystemNode( contents[i] ); 67 } 68 return result; 69 } 70 74 public static String nodeTypeName() { 75 return "union"; 76 } 77 } 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | Popular Tags |