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
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 ClassesModifier and TypeClassDescriptionstatic classType definition for a table of XDR definitions.static enumSpecification of the possible XDR definition types. -
Field Summary
Fields inherited from class org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable
documentation -
Constructor Summary
ConstructorsConstructorDescriptionJrpcgenXdrDefinition(String identifier, JrpcgenXdrDefinition.Type type) Creates a new XDR definition instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the identifier of this XDR definition.Returns the XDR aka definition type of this XDR definition.final booleanisConst()Returns whether this XDR definition belongs to a constant definition.final booleanisEnum()Returns whether this XDR definition belongs to an enumeration definition.final booleanisStruct()Returns whether this XDR definition belongs to a stucture definition.final booleanReturns whether this XDR definition belongs to a type definition.final booleanisUnion()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
-
Constructor Details
-
JrpcgenXdrDefinition
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
Returns the identifier of this XDR definition.- Specified by:
getIdentifierin interfaceJrpcgenItem- Returns:
- The identifier of this XDR definition.
-
getXdrType
Returns the XDR aka definition type of this XDR definition.- Returns:
- The XDR (definition) type of this XDR definition.
- See Also:
-
isConst
public final boolean isConst()Returns whether this XDR definition belongs to a constant definition.- Returns:
truein case this XDR definition belongs to a constant definition,falseotherwise.
-
isEnum
public final boolean isEnum()Returns whether this XDR definition belongs to an enumeration definition.- Returns:
truein case this XDR definition belongs to an enumeration definition,falseotherwise.
-
isStruct
public final boolean isStruct()Returns whether this XDR definition belongs to a stucture definition.- Returns:
truein case this XDR definition belongs to a structure definition,falseotherwise.
-
isUnion
public final boolean isUnion()Returns whether this XDR definition belongs to a union definition.- Returns:
truein case this XDR definition belongs to a union definition,falseotherwise.
-
isTypedef
public final boolean isTypedef()Returns whether this XDR definition belongs to a type definition.- Returns:
truein case this XDR definition belongs to a type definition,falseotherwise.
-