public final class LuaJavaAPI
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
checkField(int luaState,
java.lang.Object obj,
java.lang.String fieldName)
Checks if there is a field on the obj with the given name
|
static int |
checkMethod(int luaState,
java.lang.Object obj,
java.lang.String methodName)
Checks to see if there is a method with the given name.
|
static int |
classIndex(int luaState,
java.lang.Class clazz,
java.lang.String searchName)
Java function to be called when a java Class metamethod __index is called.
|
static int |
createProxyObject(int luaState,
java.lang.String implem)
Function that creates an object proxy and pushes it into the stack
|
static int |
javaLoadLib(int luaState,
java.lang.String className,
java.lang.String methodName)
Calls the static method
methodName in class className
that receives a LuaState as first parameter. |
static int |
javaNew(int luaState,
java.lang.Class clazz)
javaNew returns a new instance of a given clazz
|
static int |
javaNewInstance(int luaState,
java.lang.String className)
Pushes a new instance of a java Object of the type className
|
static int |
objectIndex(int luaState,
java.lang.Object obj,
java.lang.String methodName)
Java implementation of the metamethod __index
|
public static int objectIndex(int luaState,
java.lang.Object obj,
java.lang.String methodName)
throws LuaException
luaState - int that indicates the state usedobj - Object to be indexedmethodName - the name of the methodLuaExceptionpublic static int classIndex(int luaState,
java.lang.Class clazz,
java.lang.String searchName)
throws LuaException
luaState - int that represents the state to be usedclazz - class to be indexedsearchName - name of the field or method to be accessedLuaExceptionpublic static int javaNewInstance(int luaState,
java.lang.String className)
throws LuaException
luaState - int that represents the state to be usedclassName - name of the classLuaExceptionpublic static int javaNew(int luaState,
java.lang.Class clazz)
throws LuaException
luaState - int that represents the state to be usedclazz - class to be instanciatedLuaExceptionpublic static int javaLoadLib(int luaState,
java.lang.String className,
java.lang.String methodName)
throws LuaException
methodName in class className
that receives a LuaState as first parameter.luaState - int that represents the state to be usedclassName - name of the class that has the open library methodmethodName - method to open libraryLuaExceptionpublic static int checkField(int luaState,
java.lang.Object obj,
java.lang.String fieldName)
throws LuaException
luaState - int that represents the state to be usedobj - object to be inspectedfieldName - name of the field to be inpectedLuaExceptionpublic static int checkMethod(int luaState,
java.lang.Object obj,
java.lang.String methodName)
luaState - int that represents the state to be usedobj - object to be inspectedmethodName - name of the field to be inpectedpublic static int createProxyObject(int luaState,
java.lang.String implem)
throws LuaException
luaState - int that represents the state to be usedimplem - interfaces implemented separated by comma (,)LuaException