org.acplt.oncrpc.apps.jrpcgen
Class JrpcgenUnion

java.lang.Object
  extended by org.acplt.oncrpc.apps.jrpcgen.JrpcgenUnion

public class JrpcgenUnion
extends java.lang.Object

The JrpcgenUnion class represents a single union defined in an rpcgen "x"-file.


Field Summary
 JrpcgenDeclaration descriminant
          JrpcgenDeclaration of descriminant element (containing its identifier and data type).
 java.util.Vector elements
          Contains arms of union.
 java.lang.String identifier
          Union identifier.
 
Constructor Summary
JrpcgenUnion(java.lang.String identifier, JrpcgenDeclaration descriminant, java.util.Vector elements)
          Constructs a JrpcgenUnion and sets the identifier, the descrimant element as well as all attribute elements.
 
Method Summary
 void dump()
          Dumps the union together with its attribute elements end the descriminant to System.out.
 java.lang.String toString()
          Returns just the identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

identifier

public java.lang.String identifier
Union identifier.


descriminant

public JrpcgenDeclaration descriminant
JrpcgenDeclaration of descriminant element (containing its identifier and data type).


elements

public java.util.Vector elements
Contains arms of union. The arms are of class JrpcgenDeclaration. The keys are the descriminant values.

Constructor Detail

JrpcgenUnion

public JrpcgenUnion(java.lang.String identifier,
                    JrpcgenDeclaration descriminant,
                    java.util.Vector elements)
Constructs a JrpcgenUnion and sets the identifier, the descrimant element as well as all attribute elements.

Parameters:
identifier - Identifier to be declared.
descriminant - Descriminant element of class JrpcgenDeclaration.
elements - Vector of atrribute elements of class JrpcgenDeclaration.
Method Detail

toString

public java.lang.String toString()
Returns just the identifier.

Overrides:
toString in class java.lang.Object

dump

public void dump()
Dumps the union together with its attribute elements end the descriminant to System.out.