|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.keplerproject.luajava.LuaObject
This class represents a Lua object of any type.
A LuaObject is constructed by a LuaState object using one of the four methods:
LuaState.getLuaObject(String globalName)LuaState.getLuaObject(LuaObject parent, String name)LuaState.getLuaObject(LuaObject parent, Number name)LuaState.getLuaObject(LuaObject parent, LuaObject name)LuaState.getLuaObject(int index)createProxy(String implements).
This method receives the string with the name of the interfaces implemented by
the object separated by comma.
| Method Summary | |
java.lang.Object |
call(java.lang.Object[] args)
Calls the object represented by this using Lua function
pcall. |
java.lang.Object[] |
call(java.lang.Object[] args,
int nres)
Calls the object represented by this using Lua function
pcall. |
java.lang.Object |
createProxy(java.lang.String implem)
Function that creates a java proxy to the object represented by this |
boolean |
getBoolean()
|
LuaObject |
getField(java.lang.String field)
If this |
LuaState |
getLuaState()
Gets the Object's State |
double |
getNumber()
|
java.lang.Object |
getObject()
|
java.lang.String |
getString()
|
boolean |
isBoolean()
|
boolean |
isFunction()
|
boolean |
isJavaFunction()
|
boolean |
isJavaObject()
|
boolean |
isNil()
|
boolean |
isNumber()
|
boolean |
isString()
|
boolean |
isTable()
|
boolean |
isUserdata()
|
void |
push()
Pushes the object represented by this |
java.lang.String |
toString()
|
int |
type()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public LuaState getLuaState()
public void push()
this into L's stack
public boolean isNil()
public boolean isBoolean()
public boolean isNumber()
public boolean isString()
public boolean isFunction()
public boolean isJavaObject()
public boolean isJavaFunction()
public boolean isTable()
public boolean isUserdata()
public int type()
public boolean getBoolean()
public double getNumber()
public java.lang.String getString()
public java.lang.Object getObject()
throws LuaException
LuaException
public LuaObject getField(java.lang.String field)
throws LuaException
this is a table or userdata tries to set
a field value.
- Throws:
LuaException
public java.lang.Object[] call(java.lang.Object[] args,
int nres)
throws LuaException
this using Lua function
pcall.
args - - Call argumentsnres - - Number of objects returned
LuaException
public java.lang.Object call(java.lang.Object[] args)
throws LuaException
this using Lua function
pcall. Returns 1 object
args - - Call arguments
LuaExceptionpublic java.lang.String toString()
public java.lang.Object createProxy(java.lang.String implem)
throws java.lang.ClassNotFoundException,
LuaException
this
implem - Interfaces that are implemented, separated by ,
java.lang.ClassNotFoundException
LuaException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||