Package org.acplt.oncrpc.apps.jrpcgen

# Class JrpcgenUnionArm

java.lang.Object
org.acplt.oncrpc.apps.jrpcgen.JrpcgenUnionArm

public class JrpcgenUnionArm extends Object
The `JrpcgenUnionArm` class represents a single union arm defined for a particular union in an rpcgen "x"-file.

Version:
  $Revision: 1.2 $ $Date: 2003/08/14 08:09:59 $ $State: Exp $ $Locker: $
Author:
  Harald Albrecht

## Field Summary

Fields
Modifier and Type
Field
Description
`JrpcgenDeclaration`
`element`
Attribute element of descriminated arm (of class `JrpcgenDeclaration`).
`String`
`value`
Value for which the descriminated union arm is valid.

## Constructor Summary

Constructors
Constructor
Description
`JrpcgenUnionArm(String value, JrpcgenDeclaration element)`
Constructs a `JrpcgenUnionArm` and sets decrimated arm's value and the associated attribute element.

## Method Summary

Modifier and Type
Method
Description
`void`
`dump()`
Dumps the union arm to `System.out`.
`<T extends Appendable>
T`
`dump(T appendable)`
`void`
`endCase(JrpcgenJavaFile javaFile)`
`boolean`
`hasPayload()`
`boolean`
`hasVoidType()`
`boolean`
`isDefaultArm()`
`boolean`
`mapsToFollowingArm()`
`void`
`startCase(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)`
`String`
`toString()`
`void`
`updateHash(JrpcgenSHA hash)`
`void`
`writeConstructorArm(JrpcgenJavaFile javaFile, String valueName, JrpcgenContext context)`
`void`
`writeDecodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)`
`void`
`writeEncodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)`
`void`
`writeEqualsPart(JrpcgenJavaFile javaFile, JrpcgenContext context)`
`void`
`writeMemberDeclaration(JrpcgenJavaFile javaFile, String access, boolean initString)`
`void`
`writeToStringPart(JrpcgenJavaFile javaFile, JrpcgenContext context)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### value

public String value
Value for which the descriminated union arm is valid.

### element

public JrpcgenDeclaration element
Attribute element of descriminated arm (of class `JrpcgenDeclaration`).

## Constructor Details

### JrpcgenUnionArm

public JrpcgenUnionArm(String value, JrpcgenDeclaration element)
Constructs a `JrpcgenUnionArm` and sets decrimated arm's value and the associated attribute element.

Parameters:
  `value` - Value for which descriminated arm is valid.
  `element` - Descriminated arm element of class `JrpcgenDeclaration`.

## Method Details

### mapsToFollowingArm

public boolean mapsToFollowingArm()

### isDefaultArm

public boolean isDefaultArm()

### hasVoidType

public boolean hasVoidType()

### hasPayload

public boolean hasPayload()

### updateHash

public void updateHash(JrpcgenSHA hash)

### writeMemberDeclaration

public void writeMemberDeclaration(JrpcgenJavaFile javaFile, String access, boolean initString)

### startCase

public void startCase(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)

### endCase

public void endCase(JrpcgenJavaFile javaFile)

### writeConstructorArm

public void writeConstructorArm(JrpcgenJavaFile javaFile, String valueName, JrpcgenContext context)

### writeEncodingPart

public void writeEncodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)

### writeDecodingPart

public void writeDecodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)

### writeToStringPart

public void writeToStringPart(JrpcgenJavaFile javaFile, JrpcgenContext context)

### writeEqualsPart

public void writeEqualsPart(JrpcgenJavaFile javaFile, JrpcgenContext context)

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### dump

public void dump()
Dumps the union arm to `System.out`.

### dump

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