BlowTorch
 All Classes Namespaces Files Functions Variables Enumerator Pages
Static Public Member Functions | List of all members
org.keplerproject.luajava.LuaJavaAPI Class Reference

Static Public Member Functions

static int objectIndex (int luaState, Object obj, String methodName) throws LuaException
 
static int classIndex (int luaState, Class clazz, String searchName) throws LuaException
 
static int javaNewInstance (int luaState, String className) throws LuaException
 
static int javaNew (int luaState, Class clazz) throws LuaException
 
static int javaArray (int luaState, Class clazz, int size) throws LuaException
 
static int javaLoadLib (int luaState, String className, String methodName) throws LuaException
 
static int checkField (int luaState, Object obj, String fieldName) throws LuaException
 
static int checkMethod (int luaState, Object obj, String methodName)
 
static int createProxyObject (int luaState, String implem) throws LuaException
 

Detailed Description

Class that contains functions accessed by lua.

Author
Thiago Ponte

Member Function Documentation

static int org.keplerproject.luajava.LuaJavaAPI.checkField ( int  luaState,
Object  obj,
String  fieldName 
) throws LuaException
static

Checks if there is a field on the obj with the given name

Parameters
luaStateint that represents the state to be used
objobject to be inspected
fieldNamename of the field to be inpected
Returns
number of returned objects

Here is the call graph for this function:

Here is the caller graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.checkMethod ( int  luaState,
Object  obj,
String  methodName 
)
static

Checks to see if there is a method with the given name.

Parameters
luaStateint that represents the state to be used
objobject to be inspected
methodNamename of the field to be inpected
Returns
number of returned objects

Here is the call graph for this function:

Here is the caller graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.classIndex ( int  luaState,
Class  clazz,
String  searchName 
) throws LuaException
static

Java function to be called when a java Class metamethod __index is called. This function returns 1 if there is a field with searchName and 2 if there is a method if the searchName

Parameters
luaStateint that represents the state to be used
clazzclass to be indexed
searchNamename of the field or method to be accessed
Returns
number of returned objects
Exceptions
LuaException

Here is the call graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.createProxyObject ( int  luaState,
String  implem 
) throws LuaException
static

Function that creates an object proxy and pushes it into the stack

Parameters
luaStateint that represents the state to be used
impleminterfaces implemented separated by comma (,)
Returns
number of returned objects
Exceptions
LuaException

Here is the call graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.javaArray ( int  luaState,
Class  clazz,
int  size 
) throws LuaException
static

javaArray returns a new array of a given clazz

Parameters
luaStateint that represents the state to be used
clazzclass to be instanciated
intthat is the size of the array
Returns
number of returned objects
Exceptions
LuaException

Here is the call graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.javaLoadLib ( int  luaState,
String  className,
String  methodName 
) throws LuaException
static

Calls the static method methodName in class className that receives a LuaState as first parameter.

Parameters
luaStateint that represents the state to be used
classNamename of the class that has the open library method
methodNamemethod to open library
Returns
number of returned objects
Exceptions
LuaException

Here is the call graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.javaNew ( int  luaState,
Class  clazz 
) throws LuaException
static

javaNew returns a new instance of a given clazz

Parameters
luaStateint that represents the state to be used
clazzclass to be instanciated
Returns
number of returned objects
Exceptions
LuaException

Here is the call graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.javaNewInstance ( int  luaState,
String  className 
) throws LuaException
static

Pushes a new instance of a java Object of the type className

Parameters
luaStateint that represents the state to be used
classNamename of the class
Returns
number of returned objects
Exceptions
LuaException

Here is the call graph for this function:

static int org.keplerproject.luajava.LuaJavaAPI.objectIndex ( int  luaState,
Object  obj,
String  methodName 
) throws LuaException
static

Java implementation of the metamethod __index

Parameters
luaStateint that indicates the state used
objObject to be indexed
methodNamethe name of the method
Returns
number of returned objects

Here is the call graph for this function:


The documentation for this class was generated from the following file: