public class LuaState extends Object
The class performs extensive checking on all arguments and its state. Specifically, the following exceptions are thrown under the indicated conditions:
Exception | When |
---|---|
NullPointerException |
if an argument is null and the API does not explicitly
specify that the argument may be null |
IllegalStateException |
if the Lua state is closed and the API does not explicitly specify that the method may be invoked on a closed Lua state |
IllegalArgumentException |
if a stack index refers to an undefined stack location and the API does not explicitly specify that the stack index may be undefined |
IllegalArgumentException |
if a stack index refers to an stack location with value type that is different from the value type explicitly specified in the API |
IllegalArgumentException |
if a count is negative or out of range and the API does not explicitly specify that the count may be negative or out of range |
LuaRuntimeException |
if a Lua runtime error occurs |
LuaSyntaxException |
if a the syntax of a Lua chunk is incorrect |
LuaMemoryAllocationException |
if the Lua memory allocator runs out of memory or if a JNI allocation fails |
Modifier and Type | Class and Description |
---|---|
static class |
LuaState.GcAction
Represents a Lua garbage collector action.
|
static class |
LuaState.Library
Represents a Lua library.
|
Modifier and Type | Field and Description |
---|---|
static int |
ENVIRONINDEX
Environment pseudo-index.
|
static int |
GLOBALSINDEX
Globals pseudo-index.
|
static String |
LUA_VERSION
The Lua version.
|
static int |
MULTRET
Multiple returns pseudo return value count.
|
static int |
REGISTRYINDEX
Registry pseudo-index.
|
static String |
VERSION
The JNLua version.
|
static int |
YIELD
Status indicating that a thread is suspended.
|
Constructor and Description |
---|
LuaState()
Creates a new instance.
|
LuaState(long luaState)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
call(int argCount,
int returnCount)
Calls a Lua function.
|
void |
checkArg(int index,
boolean condition,
String msg)
Checks if a condition is true for the specified function argument.
|
boolean |
checkBoolean(int index)
Checks if the value of the specified function argument is a boolean.
|
boolean |
checkBoolean(int index,
boolean d)
Checks if the value of the specified function argument is a boolean.
|
byte[] |
checkByteArray(int index)
Checks if the value of the specified function argument is a string or a
number.
|
byte[] |
checkByteArray(int index,
byte[] d)
Checks if the value of the specified function argument is a string or a
number.
|
int |
checkInteger(int index)
Checks if the value of the specified function argument is a number or a
string convertible to a number.
|
int |
checkInteger(int index,
int d)
Checks if the value of the specified function argument is a number or a
string convertible to a number.
|
<T> T |
checkJavaObject(int index,
Class<T> clazz)
Checks if the value of the specified function argument is convertible to
a Java object of the specified type.
|
<T> T |
checkJavaObject(int index,
Class<T> clazz,
T d)
Checks if the value of the specified function argument is convertible to
a Java object of the specified type.
|
double |
checkNumber(int index)
Checks if the value of the specified function argument is a number or a
string convertible to a number.
|
double |
checkNumber(int index,
double d)
Checks if the value of the specified function argument is a number or a
string convertible to a number.
|
String |
checkOption(int index,
String[] options)
Checks if the value of the specified function argument is a string or a
number matching one of the specified options.
|
String |
checkOption(int index,
String[] options,
String d)
Checks if the value of the specified function argument is a string or a
number matching one of the specified options.
|
String |
checkString(int index)
Checks if the value of the specified function argument is a string or a
number.
|
String |
checkString(int index,
String d)
Checks if the value of the specified function argument is a string or a
number.
|
void |
checkType(int index,
LuaType type)
Checks if the value of the specified function argument is of the
specified type.
|
void |
close()
Closes this Lua state and releases all resources.
|
void |
concat(int n)
Concatenates the specified number values on top of the stack and replaces
them with the concatenated value.
|
void |
dump(OutputStream outputStream)
Dumps the function on top of the stack as a pre-compiled binary chunk
into an output stream.
|
boolean |
equal(int index1,
int index2)
Returns whether the values at two specified stack indexes are equal
according to Lua semantics.
|
int |
gc(LuaState.GcAction what,
int data)
Performs a garbage collection operation.
|
ClassLoader |
getClassLoader()
Returns the class loader of this Lua state.
|
Converter |
getConverter()
Returns the converter of this Lua state.
|
void |
getFEnv(int index)
Pushes on the stack the environment table of the value at the specified
index.
|
void |
getField(int index,
String key)
Pushes on the stack the value indexed by the specified string key in the
table at the specified index.
|
void |
getGlobal(String name)
Pushes the value of a global variable on the stack.
|
JavaReflector |
getJavaReflector()
Returns the Java reflector of this Lua state.
|
boolean |
getMetafield(int index,
String key)
Pushes on the stack the value of the named field in the metatable of the
value at the specified index and returns
true . |
JavaFunction |
getMetamethod(Object obj,
JavaReflector.Metamethod metamethod)
Returns a metamethod for a specified object.
|
boolean |
getMetatable(int index)
Pushes on the stack the metatable of the value at the specified index.
|
LuaValueProxy |
getProxy(int index)
Returns a proxy object for the Lua value at the specified index.
|
LuaValueProxy |
getProxy(int index,
Class<?>[] interfaces)
Returns a proxy object implementing the specified list of interfaces in
Lua.
|
<T> T |
getProxy(int index,
Class<T> interfaze)
Returns a proxy object implementing the specified interface in Lua.
|
void |
getTable(int index)
Pushes on the stack the value indexed by the key on top of the stack in
the table at the specified index.
|
int |
getTop()
Returns the number of values on the stack.
|
void |
insert(int index)
Pops the value on top of the stack inserting it at the specified index
and moving up elements above that index.
|
boolean |
isBoolean(int index)
Returns whether the value at the specified stack index is a boolean.
|
boolean |
isCFunction(int index)
Returns whether the value at the specified stack index is a C function.
|
boolean |
isFunction(int index)
Returns whether the value at the specified stack index is a function
(either a C function, a Java function or a Lua function.)
|
boolean |
isJavaFunction(int index)
Returns whether the value at the specified stack index is a Java
function.
|
boolean |
isJavaObject(int index,
Class<?> type)
Returns whether the value at the specified stack index is convertible to
a Java object of the specified type.
|
boolean |
isJavaObjectRaw(int index)
Returns whether the value at the specified stack index is a Java object.
|
boolean |
isNil(int index)
Returns whether the value at the specified stack index is
nil . |
boolean |
isNone(int index)
Returns whether the value at the specified stack index is undefined.
|
boolean |
isNoneOrNil(int index)
Returns whether the value at the specified stack index is undefined or
nil . |
boolean |
isNumber(int index)
Returns whether the value at the specified stack index is a number or a
string convertible to a number.
|
boolean |
isOpen()
Returns whether this Lua state is open.
|
boolean |
isString(int index)
Returns whether the value at the specified stack index is a string or a
number (which is always convertible to a string.)
|
boolean |
isTable(int index)
Returns whether the value at the specified stack index is a table.
|
boolean |
isThread(int index)
Returns whether the value at the specified stack index is a thread.
|
int |
length(int index)
Returns the length of the value at the specified stack index.
|
boolean |
lessThan(int index1,
int index2)
Returns whether a value at a first stack index is less than the value at
a second stack index according to Lua semantics.
|
void |
load(InputStream inputStream,
String chunkName)
Loads a Lua chunk from an input stream and pushes it on the stack as a
function.
|
void |
load(String chunk,
String chunkName)
Loads a Lua chunk from a string and pushes it on the stack as a function.
|
void |
newTable()
Creates a new table and pushes it on the stack.
|
void |
newTable(int arrayCount,
int recordCount)
Creates a new table with pre-allocated space for a number of array
elements and record elements and pushes it on the stack.
|
void |
newThread()
Pops the start function of a new Lua thread from the stack and creates
the new thread with that start function.
|
boolean |
next(int index)
Pops a key from the stack and pushes on the stack the next key and its
value in the table at the specified index.
|
void |
openLib(LuaState.Library library)
Opens the specified library in this Lua state.
|
void |
openLibs()
Opens the Lua standard libraries and the JNLua Java module in this Lua
state.
|
void |
pop(int count)
Pops values from the stack.
|
void |
pushBoolean(boolean b)
Pushes a boolean value on the stack.
|
void |
pushInteger(int n)
Pushes an integer value as a number value on the stack.
|
void |
pushJavaFunction(JavaFunction javaFunction)
Pushes a Java function on the stack.
|
void |
pushJavaObject(Object object)
Pushes a Java object on the stack with conversion.
|
void |
pushJavaObjectRaw(Object object)
Pushes a Java object on the stack.
|
void |
pushNil()
Pushes a nil value on the stack.
|
void |
pushNumber(double n)
Pushes a number value on the stack.
|
void |
pushString(byte[] b)
Pushes a byte array as a string value on the stack.
|
void |
pushString(byte[] b,
int count)
Pushes a byte array as a string value on the stack.
|
void |
pushString(String s)
Pushes a string value on the stack.
|
void |
pushValue(int index)
Pushes the value at the specified index on top of the stack.
|
boolean |
rawEqual(int index1,
int index2)
Bypassing metatable logic, returns whether the values at two specified
stack indexes are equal according to Lua semantics.
|
void |
rawGet(int index)
Bypassing metatable logic, pushes on the stack the value indexed by the
key on top of the stack in the table at the specified index.
|
void |
rawGet(int index,
int key)
Bypassing metatable logic, pushes on the stack the value indexed by the
specified integer key in the table at the specified index.
|
void |
rawSet(int index)
Bypassing metatable logic, sets the value on top of the stack in the
table at the specified index using the value on the second highest stack
position as the key.
|
void |
rawSet(int index,
int key)
Bypassing metatable logic, sets the value on top of the stack in the
table at the specified index using the specified integer key.
|
int |
ref(int index)
Stores the value on top of the stack in the table at the specified index
and returns the integer key of the value in that table as a reference.
|
void |
register(NamedJavaFunction namedJavaFunction)
Registers a named Java function as a global variable.
|
void |
register(String moduleName,
NamedJavaFunction[] namedJavaFunctions)
Registers a module and pushes the module on the stack.
|
void |
remove(int index)
Removes the value at the specified stack index moving down elements above
that index.
|
void |
replace(int index)
Replaces the value at the specified index with the value popped from the
top of the stack.
|
int |
resume(int index,
int argCount)
Resumes the thread at the specified stack index, popping the specified
number of arguments from the top of the stack and passing them to the
resumed thread.
|
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader of this Lua state.
|
void |
setConverter(Converter converter)
Sets the converter of this Lua state.
|
boolean |
setFEnv(int index)
Sets the value on top of the stack as the environment table of the value
at the specified index.
|
void |
setField(int index,
String key)
Sets the value on top of the stack in the table at the specified index
using the specified string key.
|
void |
setGlobal(String name)
Sets the value on top of the stack as a global variable and pops the
value from the stack.
|
void |
setJavaReflector(JavaReflector javaReflector)
Sets the Java reflector of this Lua state.
|
boolean |
setMetatable(int index)
Sets the value on top of the stack as the metatable of the value at the
specified index.
|
void |
setTable(int index)
Sets the value on top of the stack in the table at the specified index
using the value on the second highest stack position as the key.
|
void |
setTop(int index)
Sets the specified index as the new top of the stack.
|
int |
status(int index)
Returns the status of the thread at the specified stack index.
|
void |
tableMove(int index,
int from,
int to,
int count)
Moves the specified number of sequential elements in a table used as an
array from one index to another.
|
int |
tableSize(int index)
Counts the number of entries in a table.
|
boolean |
toBoolean(int index)
Returns the boolean representation of the value at the specified stack
index.
|
byte[] |
toByteArray(int index)
Returns the byte array representation of the value at the specified stack
index.
|
int |
toInteger(int index)
Returns the integer representation of the value at the specified stack
index.
|
JavaFunction |
toJavaFunction(int index)
Returns the Java function of the value at the specified stack index.
|
<T> T |
toJavaObject(int index,
Class<T> type)
Returns a Java object of the specified type representing the value at the
specified stack index.
|
Object |
toJavaObjectRaw(int index)
Returns the Java object of the value at the specified stack index.
|
double |
toNumber(int index)
Returns the number representation of the value at the specified stack
index.
|
long |
toPointer(int index)
Returns the pointer representation of the value at the specified stack
index.
|
String |
toString(int index)
Returns the string representation of the value at the specified stack
index.
|
LuaType |
type(int index)
Returns the type of the value at the specified stack index.
|
String |
typeName(int index)
Returns the name of the type at the specified stack index.
|
void |
unref(int index,
int reference)
Removes a previously created reference from the table at the specified
index.
|
int |
yield(int returnCount)
Yields the running thread, popping the specified number of values from
the top of the stack and passing them as return values to the thread
which has resumed the running thread.
|
public static final int REGISTRYINDEX
public static final int ENVIRONINDEX
public static final int GLOBALSINDEX
public static final int MULTRET
public static final int YIELD
public static final String VERSION
public static final String LUA_VERSION
public LuaState()
public LuaState(long luaState)
public ClassLoader getClassLoader()
The method may be invoked on a closed Lua state.
public void setClassLoader(ClassLoader classLoader)
The method may be invoked on a closed Lua state.
classLoader
- the class loader to setpublic JavaReflector getJavaReflector()
The method may be invoked on a closed Lua state.
public void setJavaReflector(JavaReflector javaReflector)
The method may be invoked on a closed Lua state.
javaReflector
- the Java reflectorpublic JavaFunction getMetamethod(Object obj, JavaReflector.Metamethod metamethod)
JavaReflector
interface, the metamethod is first
queried from the object. If the object provides the requested metamethod,
that metamethod is returned. Otherwise, the method returns the metamethod
provided by the Java reflector configured in this Lua state.
Clients requiring access to metamethods should go by this method to ensure consistent class-by-class overriding of the Java reflector.
obj
- the object, or null
public Converter getConverter()
The method may be invoked on a closed Lua state.
public void setConverter(Converter converter)
The method may be invoked on a closed Lua state.
converter
- the converterpublic final boolean isOpen()
The method may be invoked on a closed Lua state.
public void close()
The method may be invoked on a closed Lua state and has no effect in that case.
public int gc(LuaState.GcAction what, int data)
what
- the operation to performdata
- the argument required by some operations (see Lua Reference
Manual)public void openLib(LuaState.Library library)
library
- the librarypublic void openLibs()
The method opens all libraries defined by the LuaState.Library
enumeration.
public void register(NamedJavaFunction namedJavaFunction)
namedJavaFunction
- the Java function to registerpublic void register(String moduleName, NamedJavaFunction[] namedJavaFunctions)
moduleName
- the module namenamedJavaFunctions
- the Java functions of the modulepublic void load(InputStream inputStream, String chunkName) throws IOException
inputStream
- the input streamchunkName
- the name of the chunk for use in error messagesIOException
- if an IO error occurspublic void load(String chunk, String chunkName)
chunk
- the Lua source chunkchunkName
- the name of the chunk for use in error messagespublic void dump(OutputStream outputStream) throws IOException
outputStream
- the output streamIOException
- if an IO error occurspublic void call(int argCount, int returnCount)
MULTRET
, the number of values on the stack
corresponds the to number of values actually returned by the called
function.argCount
- the number of argumentsreturnCount
- the number of return values, or MULTRET
to accept all
values returned by the functionpublic void getGlobal(String name)
name
- the global variable namepublic void setGlobal(String name) throws LuaMemoryAllocationException, LuaRuntimeException
name
- the global variable nameLuaMemoryAllocationException
LuaRuntimeException
public void pushBoolean(boolean b)
b
- the boolean value to pushpublic void pushInteger(int n)
n
- the integer value to pushpublic void pushJavaFunction(JavaFunction javaFunction)
javaFunction
- the function to pushpublic void pushJavaObjectRaw(Object object)
If you require to push a Lua value that represents the Java object, then
invoke pushJavaObject(object)
.
You cannot push null
without conversion since
null
is not a Java object. The converter converts
null
to nil
.
object
- the Java objectpushJavaObject(Object)
public void pushJavaObject(Object object)
object
- the Java objectgetConverter()
,
setConverter(Converter)
public void pushNil()
public void pushNumber(double n)
n
- the number to pushpublic void pushString(String s)
s
- the string value to pushpublic void pushString(byte[] b)
b
- the byte array to pushpublic void pushString(byte[] b, int count)
b
- the byte array to pushcount
- the number of bytes in the array to push, starting from index zeropublic boolean isBoolean(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isCFunction(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isFunction(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isJavaFunction(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isJavaObjectRaw(int index)
Note that the method does not perform conversion. If you want to check if
a value is convertible to a Java object, then invoke
isJavaObject(index, Object.class)
.
The stack index may be undefined.
index
- the stack indexisJavaObject(int, Class)
public boolean isJavaObject(int index, Class<?> type)
The stack index may be undefined.
index
- the stack indexsetConverter(Converter)
,
getConverter()
public boolean isNil(int index)
nil
.
The stack index may be undefined.
index
- the stack indexnil
public boolean isNone(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isNoneOrNil(int index)
nil
.
The stack index may be undefined.
index
- the stack indexpublic boolean isNumber(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isString(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isTable(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean isThread(int index)
The stack index may be undefined.
index
- the stack indexpublic boolean equal(int index1, int index2)
index1
- the first stack indexindex2
- the second stack indexpublic boolean lessThan(int index1, int index2) throws LuaMemoryAllocationException, LuaRuntimeException
index1
- the first stack indexindex2
- the second stack indexLuaMemoryAllocationException
LuaRuntimeException
public int length(int index)
index
- the stack indexpublic boolean rawEqual(int index1, int index2)
index1
- the first stack indexindex2
- the second stack indexpublic boolean toBoolean(int index)
true
for all values
except false
and nil
.index
- the stack indexpublic byte[] toByteArray(int index)
null
.index
- the stack indexpublic int toInteger(int index)
0
.index
- the stack index0
public JavaFunction toJavaFunction(int index)
null
.index
- the stack indexnull
public Object toJavaObjectRaw(int index)
null
.
Note that the method does not convert values to Java objects. If you
require any Java object that represents the value at the specified
index, then invoke toJavaObject(index, Object.class)
.
index
- the stack indexnull
toJavaObject(int, Class)
public <T> T toJavaObject(int index, Class<T> type)
index
- the stack indextype
- the Java type to convert toClassCastException
- if the conversion is not supported by the convertergetConverter()
,
setConverter(Converter)
public double toNumber(int index)
0.0
.index
- the stack index0.0
public long toPointer(int index)
0L
. Different
values return different pointers. Other than that, the returned value has
no portable significance.index
- the stack index0L
if nonepublic String toString(int index)
null
.index
- the stack indexnull
public LuaType type(int index)
The stack index may be undefined.
index
- the stack indexnull
if the stack index is undefinedpublic String typeName(int index)
The stack index may be undefined.
index
- the indexLuaType.displayText()
,
Class.getCanonicalName()
public void concat(int n)
n
- the number of values to concatenatepublic int getTop()
public void insert(int index)
index
- the stack indexpublic void pop(int count)
count
- the number of values to poppublic void pushValue(int index)
index
- the stack indexpublic void remove(int index)
index
- the stack indexpublic void replace(int index)
index
- the stack indexpublic void setTop(int index)
The new top of the stack may be above the current top of the stack. In
this case, new values are set to nil
.
index
- the index of the new top of the stackpublic void getTable(int index)
index
- the stack index containing the tablepublic void getField(int index, String key)
index
- the stack index containing the tablekey
- the string keypublic void newTable()
public void newTable(int arrayCount, int recordCount)
arrayCount
- the number of array elementsrecordCount
- the number of record elementspublic boolean next(int index)
index
- the stack index containing the tablepublic void rawGet(int index)
index
- the stack index containing the tablepublic void rawGet(int index, int key)
index
- the stack index containing the tablekey
- the integer keypublic void rawSet(int index)
index
- the stack index containing the tablepublic void rawSet(int index, int key)
index
- the stack index containing the tablekey
- the integer keypublic void setTable(int index)
index
- the stack index containing the tablepublic void setField(int index, String key)
index
- the stack index containing the tablekey
- the string keypublic boolean getMetafield(int index, String key)
true
. If the value
does not have a metatable or if the metatable does not contain the named
field, nothing is pushed and the method returns false
.index
- the stack index containing the value to get the metafield fromkey
- the string keypublic boolean getMetatable(int index)
false
and nothing is pushed.index
- the stack index containing the value to get the metatable frompublic boolean setMetatable(int index)
index
- the stack index containing the value to set the metatable forpublic void getFEnv(int index)
nil
is pushed on the stack.index
- the stack index containing the value to get the environment
table frompublic boolean setFEnv(int index)
index
- the stack index containing the value to set the environment
table forpublic void newThread()
public int resume(int index, int argCount)
index
- the stack index containing the threadargCount
- the number of arguments to passpublic int status(int index)
0
. If the thread has yielded, the method returns
YIELD
. Other return values indicate errors for which an
exception has been thrown.index
- the indexpublic int yield(int returnCount)
return luaState.yield(n)
.returnCount
- the number of results to passpublic int ref(int index)
index
- the stack index containing the table where to store the valueunref(int, int)
public void unref(int index, int reference)
index
- the stack index containing the table where the value was
storedreference
- the reference integer keyref(int)
public int tableSize(int index)
The method provides optimized performance over a Java implementation of the same functionality due to the reduced number of JNI transitions.
index
- the stack index containing the tablepublic void tableMove(int index, int from, int to, int count)
The method provides optimized performance over a Java implementation of the same functionality due to the reduced number of JNI transitions.
index
- the stack index containing the tablefrom
- the index to move fromto
- the index to move tocount
- the number of elements to movepublic void checkArg(int index, boolean condition, String msg)
index
- the argument indexcondition
- the conditionmsg
- the error messagepublic boolean checkBoolean(int index)
index
- the argument indexpublic boolean checkBoolean(int index, boolean d)
nil
, the method returns
the specified default value. Otherwise, the method throws a Lua runtime
exception with a descriptive error message.index
- the argument indexd
- the default valuepublic byte[] checkByteArray(int index)
index
- the argument indexpublic byte[] checkByteArray(int index, byte[] d)
nil
, the
method returns the specified default value. Otherwise, the method throws
a Lua runtime exception with a descriptive error message.index
- the argument indexd
- the default valuepublic int checkInteger(int index)
index
- the argument indexpublic int checkInteger(int index, int d)
nil
, the method returns the specified default value.
Otherwise, the method throws a Lua runtime exception with a descriptive
error message.index
- the argument indexd
- the default valuepublic double checkNumber(int index)
index
- the argument indexpublic double checkNumber(int index, double d)
nil
, the method returns the specified default value.
Otherwise, the method throws a Lua runtime exception with a descriptive
error message.index
- the argument indexd
- the default valuepublic <T> T checkJavaObject(int index, Class<T> clazz)
Note that the converter converts nil
to null
.
Therefore, the method may return null
if the value is
nil
.
index
- the argument indexclazz
- the expected typenull
public <T> T checkJavaObject(int index, Class<T> clazz, T d)
nil
, the method returns
the specified default value. Otherwise, the method throws a Lua runtime
exception with a descriptive error message.index
- the argument indexclazz
- the expected classd
- the default valuepublic String checkOption(int index, String[] options)
index
- the argument indexoptions
- the optionspublic String checkOption(int index, String[] options, String d)
nil
, the method returns the specified default value.
Otherwise, the method throws a Lua runtime exception with a descriptive
error message.index
- the argument indexoptions
- the optionsd
- the default valuepublic String checkString(int index)
index
- the argument indexpublic String checkString(int index, String d)
nil
, the method
returns the specified default value. Otherwise, the method throws a Lua
runtime exception with a descriptive error message.index
- the argument indexd
- the default valuepublic void checkType(int index, LuaType type)
index
- the argument indextype
- the typepublic LuaValueProxy getProxy(int index)
index
- the stack index containing the Lua valuepublic <T> T getProxy(int index, Class<T> interfaze)
LuaValueProxy
interface in addition to the specified interface.index
- the stack index containing the tableinterfaze
- the interfacepublic LuaValueProxy getProxy(int index, Class<?>[] interfaces)
LuaValueProxy
interface in addition to the specified interfaces.index
- the stack index containing the tableinterfaces
- the interfaces