Package com.prineside.luaj.lib.jse
Class JavaInstance
java.lang.Object
com.prineside.luaj.Varargs
com.prineside.luaj.LuaValue
com.prineside.luaj.LuaUserdata
com.prineside.luaj.lib.jse.JavaInstance
- All Implemented Interfaces:
KryoSerializable
- Direct Known Subclasses:
JavaClass
LuaValue that represents a Java instance.
Will respond to get() and set() by returning field values or methods.
This class is not used directly.
It is returned by calls to CoerceJavaToLua.coerce(Object)
when a subclass of Object is supplied.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.luaj.LuaValue
LuaValue.NillableSerializer, LuaValue.None
Nested classes/interfaces inherited from class com.prineside.luaj.Varargs
Varargs.ArrayVarargs
-
Field Summary
Fields inherited from class com.prineside.luaj.LuaUserdata
m_instance, m_metatable
Fields inherited from class com.prineside.luaj.LuaValue
ADD, CALL, CONCAT, DIV, EMPTYSTRING, ENV, EQ, FALSE, INDEX, LE, LEN, LT, METATABLE, MINUSONE, MOD, MODE, MUL, NEWINDEX, NIL, NILLABLE_SERIALIZER, NILS, NONE, NOVALS, ONE, POW, SUB, TBOOLEAN, TFUNCTION, TINT, TLIGHTUSERDATA, TNIL, TNONE, TNUMBER, TOSTRING, TRUE, TSTRING, TTABLE, TTHREAD, TUSERDATA, TVALUE, TYPE_NAMES, UNM, ZERO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal LuaValue
Get a value in a table including metatag processing usingLuaValue.INDEX
.len()
Length operator: return lua length of object(#this)
including metatag processing as java intvoid
void
reset()
final void
Set a value in a table without metatag processing usingLuaValue.NEWINDEX
.void
Methods inherited from class com.prineside.luaj.LuaUserdata
checkuserdata, checkuserdata, eq, eq_b, eqmt, equals, getmetatable, hashCode, isuserdata, isuserdata, optuserdata, optuserdata, raweq, raweq, setmetatable, tojstring, touserdata, touserdata, type, typename, userdata
Methods inherited from class com.prineside.luaj.LuaValue
add, add, add, and, arg, arg1, argerror, assert_, buffer, call, call, call, call, call, cBool, cDouble, cFloat, checkboolean, checkclosure, checkdouble, checkfunction, checkglobals, checkint, checkjstring, checklong, checknotnil, checknumber, checknumber, checkstring, checktable, checkthread, cInt, cNcDouble, cNcFloat, cNcInt, cObject, comparemt, concat, concat, concatmt, concatTo, concatTo, concatTo, cRegObject, cVarargs, cVarargs, cVarargs, cVarargs, cVarargs, cVarargs, cVarargs, cVarargs, div, div, div, divInto, eqmtcall, error, get, get, gt, gt, gt, gt_b, gt_b, gt_b, gteq, gteq, gteq, gteq_b, gteq_b, gteq_b, inext, initupvalue1, invoke, invoke, invoke, invoke, invokemethod, invokemethod, invokemethod, invokemethod, isboolean, isclosure, isfunction, isint, isinttype, islong, isnil, isnumber, isRegObject, isstring, istable, isthread, isvalidkey, length, listOf, listOf, load, lt, lt, lt, lt_b, lt_b, lt_b, lteq, lteq, lteq, lteq_b, lteq_b, lteq_b, metatag, method, method, method, method, method, method, mod, mod, mod, modFrom, mul, mul, mul, narg, neg, neq, neq_b, next, not, onInvoke, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, opttable, optthread, optvalue, or, pow, pow, pow, powWith, powWith, presize, raweq, raweq, raweq, rawget, rawget, rawget, rawlen, rawset, rawset, rawset, rawset, rawset, rawset, rawset, rawsetlist, set, set, set, set, set, set, strcmp, strcmp, strongvalue, strvalue, sub, sub, sub, subargs, subFrom, subFrom, tableOf, tableOf, tableOf, tableOf, tableOf, tableOf, tailcallOf, testfor_b, toboolean, tobyte, tochar, todouble, tofloat, toint, tolong, tonumber, toshort, tostring, toString, userdataOf, userdataOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf
Methods inherited from class com.prineside.luaj.Varargs
argcheck, checkboolean, checkclosure, checkdouble, checkfunction, checkint, checkjstring, checklong, checknotnil, checknumber, checkstring, checktable, checkthread, checkuserdata, checkuserdata, checkvalue, dealias, eval, isfunction, isnil, isnoneornil, isnumber, isstring, istable, isTailcall, isthread, isuserdata, isvalue, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, opttable, optthread, optuserdata, optuserdata, optvalue, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tolong, toshort, touserdata, touserdata, type
-
Constructor Details
-
JavaInstance
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classLuaUserdata
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classLuaUserdata
-
len
Description copied from class:LuaValue
Length operator: return lua length of object(#this)
including metatag processing as java int -
reset
public void reset() -
get
Description copied from class:LuaValue
Get a value in a table including metatag processing usingLuaValue.INDEX
.- Overrides:
get
in classLuaUserdata
- Parameters:
key
- the key to look up, must not beLuaValue.NIL
or null- Returns:
LuaValue
for that key, orLuaValue.NIL
if not found and no metatag- See Also:
-
set
Description copied from class:LuaValue
Set a value in a table without metatag processing usingLuaValue.NEWINDEX
.- Overrides:
set
in classLuaUserdata
- Parameters:
key
- the key to use, must not beLuaValue.NIL
or nullvalue
- the value to use, can beLuaValue.NIL
, must not be null
-