org.jikesrvm.jni
Class FunctionTable

java.lang.Object
  extended by org.jikesrvm.jni.FunctionTable
All Implemented Interfaces:
RuntimeTable<ArchitectureSpecific.CodeArray>

public final class FunctionTable
extends Object
implements RuntimeTable<ArchitectureSpecific.CodeArray>

This class holds a JNI function table, at runtime it is an array with CodeArray elements


Field Summary
private  ArchitectureSpecific.CodeArray[] data
          The backing data used during boot image writing.
 
Constructor Summary
private FunctionTable(int size)
          Private constructor.
 
Method Summary
static FunctionTable allocate(int size)
          Create a new ITable of the specified size.
 ArchitectureSpecific.CodeArray get(int index)
          Get an ITable entry.
 ArchitectureSpecific.CodeArray[] getBacking()
          Only called at boot image write time.
 int length()
          Return the length of the ITable
 void set(int index, ArchitectureSpecific.CodeArray value)
          Set an ITable entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

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

Constructor Detail

FunctionTable

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

Method Detail

allocate

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

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

getBacking

public ArchitectureSpecific.CodeArray[] 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<ArchitectureSpecific.CodeArray>
Returns:
backing array of elements

get

public ArchitectureSpecific.CodeArray get(int index)
Get an ITable entry.

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

set

public void set(int index,
                ArchitectureSpecific.CodeArray value)
Set an ITable entry.

Specified by:
set in interface RuntimeTable<ArchitectureSpecific.CodeArray>
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<ArchitectureSpecific.CodeArray>
Returns:
length of table