Package org.acplt.oncrpc.apps.jrpcgen
Class JrpcgenDeclaration
java.lang.Object
org.acplt.oncrpc.apps.jrpcgen.JrpcgenDeclaration
- All Implemented Interfaces:
Cloneable
The
JrpcgenDeclaration
class represents a single declaration
from an rpcgen "x"-file.- Version:
- $Revision: 1.2 $ $Date: 2003/08/14 08:08:34 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates that a vector (an array) with dynamic (or unknown) size is declared.static final int
Indicates that a vector (an array) with fixed size is declared.Identifier.static final int
Indicates that an indirection (reference, pointer, whatever you like to call it nowadays) is declared.int
Kind of declaration (scalar, fixed size vector, dynamic vector).static final int
Indicates that a scalar is declared.Fixed size or upper limit for size of vector.Type specifier. -
Constructor Summary
ConstructorsConstructorDescriptionJrpcgenDeclaration
(String identifier, String type) Constructs aJrpcgenDeclaration
and sets the identifier and its data type.JrpcgenDeclaration
(String identifier, String type, int kind, String size) Constructs aJrpcgenDeclaration
and sets the identifier, its data type, kind and size of vector. -
Method Summary
-
Field Details
-
identifier
Identifier. -
type
Type specifier. -
kind
public int kindKind of declaration (scalar, fixed size vector, dynamic vector).- See Also:
-
size
Fixed size or upper limit for size of vector. -
SCALAR
public static final int SCALARIndicates that a scalar is declared.- See Also:
-
FIXEDVECTOR
public static final int FIXEDVECTORIndicates that a vector (an array) with fixed size is declared.- See Also:
-
DYNAMICVECTOR
public static final int DYNAMICVECTORIndicates that a vector (an array) with dynamic (or unknown) size is declared.- See Also:
-
INDIRECTION
public static final int INDIRECTIONIndicates that an indirection (reference, pointer, whatever you like to call it nowadays) is declared.- See Also:
-
-
Constructor Details
-
JrpcgenDeclaration
Constructs aJrpcgenDeclaration
and sets the identifier and its data type. Thekind
of the declaration is assumed to beSCALAR
.- Parameters:
identifier
- Identifier to be declared.type
- Data type the identifier is declared of.
-
JrpcgenDeclaration
Constructs aJrpcgenDeclaration
and sets the identifier, its data type, kind and size of vector. This constructur is typically used when declaring either fixed-size or dynamic arrays.- Parameters:
identifier
- Identifier to be declared.type
- Data type the identifier is declared of.kind
- Kind of declaration (scalar, vector, indirection).size
- Size of array (if fixed-sized, otherwisenull
).
-
-
Method Details
-
toString
Returns the identifier. -
dump
public void dump()Dumps the declaration toSystem.out
. -
clone
Clones declaration object.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-