Package org.acplt.oncrpc.apps.jrpcgen
Class JrpcgenDeclaration
- java.lang.Object
-
- org.acplt.oncrpc.apps.jrpcgen.JrpcgenDeclaration
-
- All Implemented Interfaces:
java.lang.Cloneable
public class JrpcgenDeclaration extends java.lang.Object implements java.lang.Cloneable
TheJrpcgenDeclaration
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
Fields Modifier and Type Field Description static int
DYNAMICVECTOR
Indicates that a vector (an array) with dynamic (or unknown) size is declared.static int
FIXEDVECTOR
Indicates that a vector (an array) with fixed size is declared.java.lang.String
identifier
Identifier.static int
INDIRECTION
Indicates that an indirection (reference, pointer, whatever you like to call it nowadays) is declared.int
kind
Kind of declaration (scalar, fixed size vector, dynamic vector).static int
SCALAR
Indicates that a scalar is declared.java.lang.String
size
Fixed size or upper limit for size of vector.java.lang.String
type
Type specifier.
-
Constructor Summary
Constructors Constructor Description JrpcgenDeclaration(java.lang.String identifier, java.lang.String type)
Constructs aJrpcgenDeclaration
and sets the identifier and its data type.JrpcgenDeclaration(java.lang.String identifier, java.lang.String type, int kind, java.lang.String size)
Constructs aJrpcgenDeclaration
and sets the identifier, its data type, kind and size of vector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Clones declaration object.void
dump()
Dumps the declaration toSystem.out
.java.lang.String
toString()
Returns the identifier.
-
-
-
Field Detail
-
identifier
public java.lang.String identifier
Identifier.
-
type
public java.lang.String type
Type specifier.
-
kind
public int kind
Kind of declaration (scalar, fixed size vector, dynamic vector).- See Also:
SCALAR
,FIXEDVECTOR
,DYNAMICVECTOR
,INDIRECTION
-
size
public java.lang.String size
Fixed size or upper limit for size of vector.
-
SCALAR
public static final int SCALAR
Indicates that a scalar is declared.- See Also:
- Constant Field Values
-
FIXEDVECTOR
public static final int FIXEDVECTOR
Indicates that a vector (an array) with fixed size is declared.- See Also:
- Constant Field Values
-
DYNAMICVECTOR
public static final int DYNAMICVECTOR
Indicates that a vector (an array) with dynamic (or unknown) size is declared.- See Also:
- Constant Field Values
-
INDIRECTION
public static final int INDIRECTION
Indicates that an indirection (reference, pointer, whatever you like to call it nowadays) is declared.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JrpcgenDeclaration
public JrpcgenDeclaration(java.lang.String identifier, java.lang.String type)
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
public JrpcgenDeclaration(java.lang.String identifier, java.lang.String type, int kind, java.lang.String size)
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 Detail
-
toString
public java.lang.String toString()
Returns the identifier.- Overrides:
toString
in classjava.lang.Object
-
dump
public void dump()
Dumps the declaration toSystem.out
.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Clones declaration object.- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
-