org.jikesrvm.objectmodel
Interface RuntimeTable<T>

All Known Implementing Classes:
FunctionTable, IMT, ITable, ITableArray, LinkageTripletTable, TIB

public interface RuntimeTable<T>

This interface is used to indicate a type will behave as a runtime table. Runtime tables are used to implement arrays whose elements can only be manipulated by the the get and set methods of the table. Every runtime table will have a static allocate method and implement the methods below.

See Also:
TypeReference.isRuntimeTable()

Method Summary
 T get(int index)
          Get a value from the table.
 T[] getBacking()
          Only called at boot image write time.
 int length()
          Get the table length.
 void set(int index, T value)
          Set a value to the table.
 

Method Detail

get

T get(int index)
Get a value from the table. This method is hijacked by the compiler but the implementation is used during boot image writing.

Parameters:
index - location to read
Returns:
value from table

set

void set(int index,
         T value)
Set a value to the table. This method is hijacked by the compiler but the implementation is used during boot image writing.

Parameters:
index - location to write
value - to write

length

int length()
Get the table length. This method is hijacked by the compiler but the implementation is used during boot image writing.

Returns:
length of table

getBacking

T[] getBacking()
Only called at boot image write time. This returns the backing array to the boot image writer.

Returns:
backing array of elements