package jacorb.ir.gui.typesystem.remote;

import org.omg.CORBA.*;
import jacorb.ir.gui.typesystem.*;

/**
 * This class was generated by a SmartGuide.
 * 
 */
public class IRUnion extends IRNode implements AbstractContainer 
{

    /**
     * IRStruct constructor comment.
     */
    protected IRUnion() {
	super();
    }
    /**
     * IRStruct constructor comment.
     * @param irObject org.omg.CORBA.IRObject
     */
    protected IRUnion(org.omg.CORBA.IRObject irObject) {
	super(irObject);
    }
    /**
     * contents method comment.
     */
    public jacorb.ir.gui.typesystem.ModelParticipant[] contents() {
	UnionDef unionDef = UnionDefHelper.narrow((org.omg.CORBA.Object)this.irObject);
	UnionMember[] members = unionDef.members();	
	Contained[] contents = unionDef.contents( org.omg.CORBA.DefinitionKind.dk_all, false);	

	jacorb.ir.gui.typesystem.TypeSystemNode[] result = 
            new jacorb.ir.gui.typesystem.TypeSystemNode[members.length + contents.length];
	for (int i=0; i<members.length; i++) {
            result[i] = RemoteTypeSystem.createTypeSystemNode(members[i]);
	} 
		for (int i = 0; i < contents.length; i++) 
        {
            result[members.length + i] = 
				RemoteTypeSystem.createTypeSystemNode( contents[i] );
		}
	return result;	
    }
    /**
     * This method was created by a SmartGuide.
     * @return java.lang.String
     */
    public static String nodeTypeName() {
	return "union";
    }
}





