Package org.acplt.oncrpc.apps.jrpcgen

# Class JrpcgenXdrDefinition

java.lang.Object
org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable
org.acplt.oncrpc.apps.jrpcgen.JrpcgenXdrDefinition

All Implemented Interfaces:
  `JrpcgenItem`

Direct Known Subclasses:
  `JrpcgenComplexType`, `JrpcgenConst`

public class JrpcgenXdrDefinition extends JrpcgenDocumentable implements JrpcgenItem
An XDR definition represents a constant definition or one of the complex type definitions. A complex type is one of enum, struct, union or typedef. An XDR definition consists of the definition type and an identifier. The definition types are defined in the enumeration `JrpcgenXdrDefinition.Type` of this class.

XDR definitions are documentable and therefore extend the class `JrpcgenDocumentable`. As they provide an identifier, they implement the interface `JrpcgenItem` and therefore can be used in item tables based on `JrpcgenItemTable`.

Although this class is not abstract, it is not intended to be used directly. It will be used as a base class for concrete realisations of constant definitions and complex type definitions, enabling the identification of their nature at this generalized level.

Author:
  Harald Wirths <hwirths@nde.ag>

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`JrpcgenXdrDefinition.Table`
Type definition for a table of XDR definitions.
`static enum`
`JrpcgenXdrDefinition.Type`
Specification of the possible XDR definition types.

## Field Summary

### Fields inherited from class org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable

`documentation`

## Constructor Summary

Constructors
Constructor
Description
`JrpcgenXdrDefinition(String identifier, JrpcgenXdrDefinition.Type type)`
Creates a new XDR definition instance.

## Method Summary

Modifier and Type
Method
Description
`final String`
`getIdentifier()`
Returns the identifier of this XDR definition.
`final JrpcgenXdrDefinition.Type`
`getXdrType()`
Returns the XDR aka definition type of this XDR definition.
`final boolean`
`isConst()`
Returns whether this XDR definition belongs to a constant definition.
`final boolean`
`isEnum()`
Returns whether this XDR definition belongs to an enumeration definition.
`final boolean`
`isStruct()`
Returns whether this XDR definition belongs to a stucture definition.
`final boolean`
`isTypedef()`
Returns whether this XDR definition belongs to a type definition.
`final boolean`
`isUnion()`
Returns whether this XDR definition belongs to a union definition.

### Methods inherited from class org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable

`appendDeprecatedOrNothing, appendDeprecatedOrNothing, documentationIsEmpty, documentationIsProvided, emptyDocumentation, getDocumentation, getIdentedDocu, getIdentedDocu, isDeprecated, writeDocumentation, writeDocumentation`

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

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

## Constructor Details

### JrpcgenXdrDefinition

public JrpcgenXdrDefinition(String identifier, JrpcgenXdrDefinition.Type type)
Creates a new XDR definition instance.

Parameters:
  `identifier` - The identifier of the new XDR definition.
  `type` - The definition type of the new XDR definition.

## Method Details

### getIdentifier

public final String getIdentifier()
Returns the identifier of this XDR definition.

Specified by:
  `getIdentifier` in interface `JrpcgenItem`
Returns:
  The identifier of this XDR definition.

### getXdrType

public final JrpcgenXdrDefinition.Type getXdrType()
Returns the XDR aka definition type of this XDR definition.

Returns:
  The XDR (definition) type of this XDR definition.
See Also:
  - `JrpcgenXdrDefinition.Type`

### isConst

public final boolean isConst()
Returns whether this XDR definition belongs to a constant definition.

Returns:
  `true` in case this XDR definition belongs to a constant definition, `false` otherwise.

### isEnum

public final boolean isEnum()
Returns whether this XDR definition belongs to an enumeration definition.

Returns:
  `true` in case this XDR definition belongs to an enumeration definition, `false` otherwise.

### isStruct

public final boolean isStruct()
Returns whether this XDR definition belongs to a stucture definition.

Returns:
  `true` in case this XDR definition belongs to a structure definition, `false` otherwise.

### isUnion

public final boolean isUnion()
Returns whether this XDR definition belongs to a union definition.

Returns:
  `true` in case this XDR definition belongs to a union definition, `false` otherwise.

### isTypedef

public final boolean isTypedef()
Returns whether this XDR definition belongs to a type definition.

Returns:
  `true` in case this XDR definition belongs to a type definition, `false` otherwise.