Package org.acplt.oncrpc.apps.jrpcgen

## Class JrpcgenUnion

- java.lang.Object
- - 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.
  Version:
    $Revision: 1.1.1.1 $ $Date: 2003/08/13 12:03:47 $ $State: Exp $ $Locker: $
  Author:
    Harald Albrecht

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `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

    Constructors
    Constructor | Description
    --- | ---
    `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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `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`.