This class represents a Lua object of any type. A LuaObject is constructed by a {@link LuaState} object using one ofthe four methods:
- {@link LuaState#getLuaObject(String globalName)}
- {@link LuaState#getLuaObject(LuaObject parent,String name)}
- {@link LuaState#getLuaObject(LuaObject parent,Number name)}
- {@link LuaState#getLuaObject(LuaObject parent,LuaObject name)}
- {@link LuaState#getLuaObject(int index)}
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