public class JrpcgenUnion extends JrpcgenComplexType
JrpcgenUnion class represents a single union defined
in an rpcgen "x"-file.JrpcgenXdrDefinition.Table, JrpcgenXdrDefinition.Typedocumentation| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
void |
dump()
Dumps the union together with its attribute elements end the
descriminant to
System.out. |
<T extends Appendable> |
dump(T appendable) |
void |
generateJavaFile()
Concrete implementations are asked to generate a Java file
containing an implementation of the Java class mapping
the complex type.
|
JrpcgenDeclaration |
getDiscriminant() |
Vector<JrpcgenUnionArm> |
getElements() |
String |
toString()
Returns just the identifier.
|
getDefinitionName, getJavaClass, getJavaName, getXdrClass, isBaseType, isBooleanType, isOpaqueType, isStringType, isVoid, writeEqualsExpression, writeJavaToXdr, writeJavaToXdr, writeXdrConstructorCall, writeXdrConstructorCall, writeXdrDecodingCall, writeXdrDynamicVectorDecodingCall, writeXdrDynamicVectorEncodingCall, writeXdrEncodingCall, writeXdrEncodingCall, writeXdrFixedVectorDecodingCall, writeXdrFixedVectorEncodingCall, writeXdrToJava, writeXdrVectorCodingMethodsgetIdentifier, getXdrType, isConst, isEnum, isStruct, isTypedef, isUnionappendDeprecatedOrNothing, appendDeprecatedOrNothing, documentationIsEmpty, documentationIsProvided, emptyDocumentation, getDocumentation, getIdentedDocu, getIdentedDocu, isDeprecated, writeDocumentation, writeDocumentationpublic JrpcgenUnion(JrpcgenContext context, String identifier, JrpcgenDeclaration discriminant, Vector<JrpcgenUnionArm> elements)
JrpcgenUnion and sets the identifier, the
descrimant element as well as all attribute elements.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.public final JrpcgenDeclaration getDiscriminant()
public final Vector<JrpcgenUnionArm> getElements()
public void generateJavaFile()
JrpcgenComplexTypegenerateJavaFile in class JrpcgenComplexTypepublic void dump()
System.out.public <T extends Appendable> T dump(T appendable)
Copyright © 2025. All rights reserved.