org.jikesrvm.objectmodel
Class ITable

java.lang.Object
  extended by org.jikesrvm.objectmodel.ITable
All Implemented Interfaces:
RuntimeTable<Object>

public final class ITable
extends Object
implements RuntimeTable<Object>

This class represents an instance of an interface table.


Field Summary
private  Object[] data
          The backing data used during boot image writing.
 
Constructor Summary
private ITable(int size)
          Private constructor.
 
Method Summary
static ITable allocate(int size)
          Creates a new ITable of the specified size.
 Object get(int index)
          Gets an entry in the ITable.
 Object[] getBacking()
          Only called at boot image write time.
 ArchitectureSpecific.CodeArray getCode(int index)
          Gets the code array at the given index.
 RVMClass getInterfaceClass()
           
 boolean isFor(RVMType I)
          Does this ITable correspond to the given interface?
 int length()
          Return the length of the ITable
 void set(int index, Object value)
          Sets an entry in this ITable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private final Object[] data
The backing data used during boot image writing.

Constructor Detail

ITable

private ITable(int size)
Private constructor. Can not create instances.

Method Detail

allocate

public static ITable allocate(int size)
Creates a new ITable of the specified size.

Parameters:
size - The size of the ITable
Returns:
The created ITable instance.

getBacking

public Object[] getBacking()
Description copied from interface: RuntimeTable
Only called at boot image write time. This returns the backing array to the boot image writer.

Specified by:
getBacking in interface RuntimeTable<Object>
Returns:
backing array of elements

get

public Object get(int index)
Gets an entry in the ITable.

Specified by:
get in interface RuntimeTable<Object>
Parameters:
index - The index of the entry to get
Returns:
The value of that entry

isFor

public boolean isFor(RVMType I)
Does this ITable correspond to the given interface?

Parameters:
I - The interface
Returns:
True if this ITable is for the given interface

getInterfaceClass

public RVMClass getInterfaceClass()
Returns:
The interface class for this ITable

getCode

public ArchitectureSpecific.CodeArray getCode(int index)
Gets the code array at the given index.

Parameters:
index - The index
Returns:
The code array

set

public void set(int index,
                Object value)
Sets an entry in this ITable.

Specified by:
set in interface RuntimeTable<Object>
Parameters:
index - The index of the entry to set
value - The value to set the entry to.

length

public int length()
Return the length of the ITable

Specified by:
length in interface RuntimeTable<Object>
Returns:
length of table