Class JrpcgenUnion

All Implemented Interfaces:
JrpcgenItem, JrpcgenTypeMapping

public class JrpcgenUnion extends JrpcgenComplexType
The JrpcgenUnion class represents a single union defined in an rpcgen "x"-file.
Version:
$Revision: 1.1 $ $Date: 2003/08/13 12:03:47 $ $State: Exp $ $Locker: $
Author:
Harald Albrecht
  • Constructor Details

    • JrpcgenUnion

      public JrpcgenUnion(JrpcgenContext context, String identifier, JrpcgenDeclaration discriminant, Vector<JrpcgenUnionArm> elements)
      Constructs a JrpcgenUnion and sets the identifier, the descrimant element as well as all attribute elements.
      Parameters:
      context - The context the nwe union belongs to.
      identifier - Identifier to be declared.
      discriminant - Discriminant element of class JrpcgenDeclaration.
      elements - Vector of atrribute elements of class JrpcgenDeclaration.
  • Method Details

    • toString

      public String toString()
      Returns just the identifier.
      Overrides:
      toString in class Object
    • getDiscriminant

      public final JrpcgenDeclaration getDiscriminant()
    • getElements

      public final Vector<JrpcgenUnionArm> getElements()
    • generateJavaFile

      public void generateJavaFile()
      Description copied from class: JrpcgenComplexType
      Concrete implementations are asked to generate a Java file containing an implementation of the Java class mapping the complex type.
      Specified by:
      generateJavaFile in class JrpcgenComplexType
    • dump

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

      public <T extends Appendable> T dump(T appendable)