Package org.acplt.oncrpc

# Class XdrEnum<T extends HasEncoding<T>>

java.lang.Object
org.acplt.oncrpc.XdrEnum<T>

Type Parameters:
  `T` - typical an enum class, see above.

All Implemented Interfaces:
  `XdrAble`

public class XdrEnum<T extends HasEncoding<T>> extends Object implements XdrAble
wrapper provides XdrAble for generated java enums.
e.g.: public enum SummaryAlarm implements HasEncoding<SummaryAlarm> { .. }

Author:
  zelgerpe

## Constructor Summary

Constructors
Constructor
Description
`XdrEnum(T ee)`
`XdrEnum(T ee, XdrDecodingStream xdr)`

## Method Summary

Modifier and Type
Method
Description
`static <T> HasEncoding<T>`
`create(int e, HasEncoding<T> tt)`
`static <T> T`
`create(HasEncoding<T> tt, XdrDecodingStream xdr)`
`static <T> T`
`fromEncoding(int e, HasEncoding<T> tt)`
`T`
`getValue()`
`HasEncoding<T>`
`getWrapped()`
`String`
`toString()`
`void`
`xdrDecode(XdrDecodingStream xdr)`
Decodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.
`void`
`xdrEncode(XdrEncodingStream xdr)`
Encodes -- that is: serializes -- an object into a XDR stream in compliance to RFC 1832.

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

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

## Constructor Details

### XdrEnum

public XdrEnum(T ee)

### XdrEnum

public XdrEnum(T ee, XdrDecodingStream xdr) throws OncRpcException, IOException

Throws:
  `OncRpcException`
  `IOException`

## Method Details

### xdrEncode

public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException
Description copied from interface: `XdrAble`
Encodes -- that is: serializes -- an object into a XDR stream in compliance to RFC 1832.

Specified by:
  `xdrEncode` in interface `XdrAble`
Parameters:
  `xdr` - XDR stream to which information is sent for encoding.
Throws:
  `OncRpcException` - if an ONC/RPC error occurs.
  `IOException` - if an I/O error occurs.

### xdrDecode

public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException
Description copied from interface: `XdrAble`
Decodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.

Specified by:
  `xdrDecode` in interface `XdrAble`
Parameters:
  `xdr` - XDR stream from which decoded information is retrieved.
Throws:
  `OncRpcException` - if an ONC/RPC error occurs.
  `IOException` - if an I/O error occurs.

### getWrapped

public HasEncoding<T> getWrapped()

### getValue

public T getValue()

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### create

public static <T> T create(HasEncoding<T> tt, XdrDecodingStream xdr) throws OncRpcException, IOException

Throws:
  `OncRpcException`
  `IOException`

### create

public static <T> HasEncoding<T> create(int e, HasEncoding<T> tt) throws OncRpcException

Throws:
  `OncRpcException`

### fromEncoding

public static <T> T fromEncoding(int e, HasEncoding<T> tt)