Modifier and Type | Field and 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.
|
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.
|
String |
size
Fixed size or upper limit for size of vector.
|
String |
type
Type specifier.
|
Constructor and Description |
---|
JrpcgenDeclaration(String identifier,
String type)
Constructs a
JrpcgenDeclaration and sets the identifier
and its data type. |
JrpcgenDeclaration(String identifier,
String type,
int kind,
String size)
Constructs a
JrpcgenDeclaration and sets the identifier,
its data type, kind and size of vector. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones declaration object.
|
void |
dump()
Dumps the declaration to
System.out . |
String |
toString()
Returns the identifier.
|
public String identifier
public String type
public int kind
SCALAR
,
FIXEDVECTOR
,
DYNAMICVECTOR
,
INDIRECTION
public String size
public static final int SCALAR
public static final int FIXEDVECTOR
public static final int DYNAMICVECTOR
public static final int INDIRECTION
public JrpcgenDeclaration(String identifier, String type)
JrpcgenDeclaration
and sets the identifier
and its data type. The kind
of the
declaration is assumed to be SCALAR
.identifier
- Identifier to be declared.type
- Data type the identifier is declared of.public JrpcgenDeclaration(String identifier, String type, int kind, String size)
JrpcgenDeclaration
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.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, otherwise null
).public void dump()
System.out
.public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2022. All rights reserved.