| java.lang.Object org.keplerproject.luajava.LuaObject
LuaObject | public class LuaObject (Code) | | This class represents a Lua object of any type. A LuaObject is constructed by a
LuaState object using one of
the four methods:
The LuaObject will represent only the object itself, not a variable or a stack index, so when you change a string,
remember that strings are immutable objects in Lua, and the LuaObject you have will represent the old one.
Proxies
LuaJava allows you to implement a class in Lua, like said before. If you want to create this proxy from Java, you
should have a LuaObject representing the table that has the functions that implement the interface. From this
LuaObject you can call the createProxy(String implements) . This method receives the string with the
name of the interfaces implemented by the object separated by comma.
author: Rizzato author: Thiago Ponte |
LuaObject | protected LuaObject(LuaState L, String globalName)(Code) | | Creates a reference to an object in the variable globalName
Parameters: L - Parameters: globalName - |
LuaObject | protected LuaObject(LuaObject parent, String name) throws LuaException(Code) | | Creates a reference to an object inside another object
Parameters: parent - The Lua Table or Userdata that contains the Field. Parameters: name - The name that index the field |
LuaObject | protected LuaObject(LuaObject parent, Number name) throws LuaException(Code) | | This constructor creates a LuaObject from a table that is indexed by a number.
Parameters: parent - The Lua Table or Userdata that contains the Field. Parameters: name - The name (number) that index the field throws: LuaException - When the parent object isn't a Table or Userdata |
LuaObject | protected LuaObject(LuaObject parent, LuaObject name) throws LuaException(Code) | | This constructor creates a LuaObject from a table that is indexed by a LuaObject.
Parameters: parent - The Lua Table or Userdata that contains the Field. Parameters: name - The name (LuaObject) that index the field throws: LuaException - When the parent object isn't a Table or Userdata |
LuaObject | protected LuaObject(LuaState L, int index)(Code) | | Creates a reference to an object in the given index of the stack
Parameters: L - Parameters: index - of the object on the lua stack |
call | public Object[] call(Object[] args, int nres) throws LuaException(Code) | | Calls the object represented by this using Lua function pcall.
Parameters: args - -Call arguments Parameters: nres - -Number of objects returned Object[] - Returned Objects throws: LuaException - |
call | public Object call(Object[] args) throws LuaException(Code) | | Calls the object represented by this using Lua function pcall. Returns 1 object
Parameters: args - -Call arguments Object - Returned Object throws: LuaException - |
finalize | protected void finalize()(Code) | | |
getBoolean | public boolean getBoolean()(Code) | | |
getLuaState | public LuaState getLuaState()(Code) | | Gets the Object's State
|
getNumber | public double getNumber()(Code) | | |
isBoolean | public boolean isBoolean()(Code) | | |
isFunction | public boolean isFunction()(Code) | | |
isJavaFunction | public boolean isJavaFunction()(Code) | | |
isJavaObject | public boolean isJavaObject()(Code) | | |
isNil | public boolean isNil()(Code) | | |
isNumber | public boolean isNumber()(Code) | | |
isString | public boolean isString()(Code) | | |
isTable | public boolean isTable()(Code) | | |
isUserdata | public boolean isUserdata()(Code) | | |
push | public void push()(Code) | | Pushes the object represented by this into L's stack
|
|
|