public class LuaObject
extends java.lang.Object
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.| 限定符 | 构造器和说明 |
|---|---|
protected |
LuaObject(LuaObject parent,
LuaObject name)
This constructor creates a LuaObject from a table that is indexed by a LuaObject.
|
protected |
LuaObject(LuaObject parent,
java.lang.Number name)
This constructor creates a LuaObject from a table that is indexed by a number.
|
protected |
LuaObject(LuaObject parent,
java.lang.String name)
Creates a reference to an object inside another object
|
protected |
LuaObject(LuaState L,
int index)
Creates a reference to an object in the given index of the stack
|
protected |
LuaObject(LuaState L,
java.lang.String globalName)
Creates a reference to an object in the variable globalName
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
protected void |
finalize() |
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() |
protected java.lang.Integer ref
protected LuaState L
protected LuaObject(LuaState L, java.lang.String globalName)
L - globalName - protected LuaObject(LuaObject parent, java.lang.String name) throws LuaException
parent - The Lua Table or Userdata that contains the Field.name - The name that index the fieldLuaExceptionprotected LuaObject(LuaObject parent, java.lang.Number name) throws LuaException
parent - The Lua Table or Userdata that contains the Field.name - The name (number) that index the fieldLuaException - When the parent object isn't a Table or Userdataprotected LuaObject(LuaObject parent, LuaObject name) throws LuaException
parent - The Lua Table or Userdata that contains the Field.name - The name (LuaObject) that index the fieldLuaException - When the parent object isn't a Table or Userdataprotected LuaObject(LuaState L, int index)
L - index - of the object on the lua stackpublic LuaState getLuaState()
protected void finalize()
finalize 在类中 java.lang.Objectpublic void push()
this into L's stackpublic 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
LuaExceptionpublic LuaObject getField(java.lang.String field) throws LuaException
this is a table or userdata tries to set
a field value.LuaExceptionpublic java.lang.Object[] call(java.lang.Object[] args,
int nres)
throws LuaException
this using Lua function pcall.args - -
Call argumentsnres - -
Number of objects returnedLuaExceptionpublic java.lang.Object call(java.lang.Object[] args)
throws LuaException
this using Lua function pcall. Returns 1 objectargs - -
Call argumentsLuaExceptionpublic java.lang.String toString()
toString 在类中 java.lang.Objectpublic java.lang.Object createProxy(java.lang.String implem)
throws java.lang.ClassNotFoundException,
LuaException
thisimplem - Interfaces that are implemented, separated by ,java.lang.ClassNotFoundExceptionLuaException