Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Array Class Reference

Inheritance diagram for Array:
[legend]
Collaboration diagram for Array:
[legend]
List of all members.

Public Methods

 Array ()
void addElement (Object e)
void clear ()
boolean contains (Object e)
Object elementAt (int index)
void insertElementAt (Object e, int index)
void removeElementAt (int index)
int size ()
 Array (Type baseType, ConstExpr size)
void apply (TypeSwitch sw, Object o)
Expr defaultVal ()
boolean equals (Object o)
Type getBaseType ()
int getExtent ()
ConstExpr getSize ()
boolean isKind (int kind)
String toString ()

Private Methods

void doubleCapacity ()

Private Attributes

int numElements
int maxElements
Object[] elements
Type baseType
ConstExpr size

Static Private Attributes

final int DEFAULT_SIZE = 8

Detailed Description

An array type.

A BIR array has a base type and a maximum size (arrays are indexed from 0).

Definition at line 69 of file ca/mcgill/sable/util/Array.java.


Member Function Documentation

boolean Array::equals Object   o [inline]
 

Returns:
boolean
Parameters:
otherType   java.lang.Object

Reimplemented from Type.

Definition at line 61 of file edu/ksu/cis/bandera/bir/Array.java.

ConstExpr Array::getSize   [inline]
 

Returns:
stack size of this type (2 for long and double, 0 for void, 1 otherwise)

Reimplemented from Type.

Definition at line 72 of file edu/ksu/cis/bandera/bir/Array.java.

Referenced by SmvTypeDecl::caseArray(), SpinTrans::caseNewArrayExpr(), and SmvTrans::caseNewArrayExpr().

String Array::toString   [inline]
 

Returns:
Type string, e.g. `int[]'

Reimplemented from Type.

Definition at line 77 of file edu/ksu/cis/bandera/bir/Array.java.


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:04:37 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001