|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.hir.Specifier
cetus.hir.ArraySpecifier
public class ArraySpecifier
Represents an array specifier, for example the bracketed parts of int array[20][30];
| Field Summary | |
|---|---|
static ArraySpecifier |
UNBOUNDED
The unbounded specifier [] |
| Fields inherited from class cetus.hir.Specifier |
|---|
ABSTRACT, AUTO, BOOL, BOOLEAN, BYTE, CBOOL, CCOMPLEX, CHAR, CIMAGINARY, CONST, DOUBLE, EXPLICIT, EXTERN, FINAL, FLOAT, FRIEND, INLINE, INT, LONG, MUTABLE, NATIVE, PRIVATE, PROTECTED, PUBLIC, REFERENCE, REGISTER, RESTRICT, SHORT, SIGNED, STATIC, STRICTFP, SYNCHRONIZED, THREADSAFE, TRANSIENT, TYPEDEF, UNSIGNED, value, VIRTUAL, VOID, VOLATILE, WCHAR_T |
| Constructor Summary | |
|---|---|
ArraySpecifier()
|
|
ArraySpecifier(Expression expr)
|
|
ArraySpecifier(java.util.List dimensions)
|
|
| Method Summary | |
|---|---|
Expression |
getDimension(int n)
Gets the nth dimension of this array specifier. |
int |
getNumDimensions()
Returns the number of index expressions used in this array specifier. |
void |
print(java.io.OutputStream stream)
Print the code for the IR represented by the object. |
void |
setDimension(int n,
Expression expr)
Sets the nth dimension of this array specifier. |
void |
setDimensions(java.util.List dimensions)
Set the list of dimension expressions. |
java.lang.String |
toString()
|
| Methods inherited from class cetus.hir.Specifier |
|---|
fromString, isCType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ArraySpecifier UNBOUNDED
| Constructor Detail |
|---|
public ArraySpecifier()
public ArraySpecifier(Expression expr)
public ArraySpecifier(java.util.List dimensions)
| Method Detail |
|---|
public Expression getDimension(int n)
n - The position of the dimension.
java.lang.IndexOutOfBoundsException - if there is no expression at that position.public int getNumDimensions()
public void print(java.io.OutputStream stream)
Printable
print in interface Printableprint in class Specifierstream - The stream on which to print the data.public java.lang.String toString()
toString in class Specifier
public void setDimension(int n,
Expression expr)
n - The position of the dimension.expr - The expression defining the size of the dimension.
java.lang.IndexOutOfBoundsException - if there is no dimension at that position.public void setDimensions(java.util.List dimensions)
dimensions - A list of expressions.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||