Class ClassTreeLuaTable
java.lang.Object
com.prineside.luaj.Varargs
com.prineside.luaj.LuaValue
com.prineside.luaj.LuaTable
com.prineside.tdi2.managers.script.ClassTreeLuaTable
- All Implemented Interfaces:
KryoSerializable
Read-only LuaTable which stores a part of the class tree and allows to be properly serialized
in case user stores a part of the tree in a separate variable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.luaj.LuaTable
LuaTable.DeadSlot, LuaTable.IntKeyEntry, LuaTable.LinkSlot, LuaTable.NormalEntry, LuaTable.NumberValueEntry, LuaTable.Slot
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.LuaTable
CLASS_COMPARATOR
Fields inherited from class com.prineside.luaj.LuaValue
ADD, CALL, CONCAT, DIV, EMPTYSTRING, ENV, EQ, FALSE, INDEX, IPAIRS, LE, LEN, LT, METATABLE, MINUSONE, MOD, MODE, MUL, NEWINDEX, NIL, NILLABLE_SERIALIZER, NILS, NONE, NOVALS, ONE, PAIRS, POW, SUB, TBOOLEAN, TFUNCTION, TINT, TLIGHTUSERDATA, TNIL, TNONE, TNUMBER, TOSTRING, TRUE, TSTRING, TTABLE, TTHREAD, TUSERDATA, TVALUE, TYPE_NAMES, UNM, ZERO
-
Constructor Summary
ConstructorsConstructorDescriptionClassTreeLuaTable
(LuaValue table) Copies the table into ReadOnly recursively -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Set a value in a table without metatag processing.void
caller must ensure key is not nilvoid
remove
(int pos) Remove the element at a position in a list-tablevoid
Set a value in a table without metatag processing usingLuaValue.NEWINDEX
.setmetatable
(LuaValue metatable) Set the metatable for thisLuaValue
tostring()
Conditionally convert to lua string without throwing errors.void
Methods inherited from class com.prineside.luaj.LuaTable
arrayget, checktable, concat, entry, eq, eq_b, get, get, getHashEntries, getmetatable, hashmod, hashpow2, hashset, hashSlot, inext, insert, istable, keyCount, keys, len, length, next, opttable, presize, presize, rawget, rawget, rawlen, set, sort, toLuaValue, type, typename, unpack, unpack, unpack, useWeakKeys, useWeakValues, wrap
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, checkuserdata, checkuserdata, cInt, cNcDouble, cNcFloat, cNcInt, cObject, comparemt, concat, concat, concatmt, concatTo, concatTo, concatTo, cRegObject, div, div, div, divInto, eqmtcall, equals, error, get, gt, gt, gt, gt_b, gt_b, gt_b, gteq, gteq, gteq, gteq_b, gteq_b, gteq_b, initupvalue1, invoke, invoke, invoke, invoke, invoke, invokemethod, invokemethod, invokemethod, invokemethod, isboolean, isclosure, isfunction, isint, isinttype, islong, isnil, isnumber, isRegObject, isstring, isuserdata, isuserdata, isvalidkey, 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, not, onInvoke, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, optuserdata, optuserdata, optvalue, or, pow, pow, pow, powWith, powWith, raweq, raweq, raweq, raweq, raweq, rawget, rawset, rawset, rawset, rawset, rawset, rawsetlist, 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, tojstring, tolong, tonumber, toshort, toString, touserdata, touserdata, userdataOf, userdataOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, varargsOf, varargsOf, varargsOf, varargsOf, varargsOf, varargsOf
Methods inherited from class com.prineside.luaj.Varargs
argcheck, checkboolean, checkclosure, checkdouble, checkfunction, checkint, checkjstring, checklong, checknotnil, checknumber, checkstring, checktable, checkuserdata, checkuserdata, checkvalue, dealias, eval, isfunction, isnil, isnoneornil, isnumber, isstring, istable, isTailcall, isuserdata, isvalue, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, opttable, optuserdata, optuserdata, optvalue, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tolong, toshort, touserdata, touserdata, type
-
Constructor Details
-
ClassTreeLuaTable
Copies the table into ReadOnly recursively
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classLuaTable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classLuaTable
-
loadFrom
-
setmetatable
Description copied from class:LuaValue
Set the metatable for thisLuaValue
For
LuaTable
andLuaUserdata
instances, the metatable is per instance. For all other types, there is one metatable per type that can be set directly from java- Overrides:
setmetatable
in classLuaTable
- Parameters:
metatable
-LuaValue
instance to serve as the metatable, or null to reset it.- Returns:
this
to allow chaining of Java function calls
-
set
Description copied from class:LuaValue
Set a value in a table without metatag processing usingLuaValue.NEWINDEX
.- Overrides:
set
in classLuaTable
- Parameters:
key
- the key to usevalue
- the value to use, can beLuaValue.NIL
, must not be null
-
rawset
Description copied from class:LuaValue
Set a value in a table without metatag processing.- Overrides:
rawset
in classLuaTable
- Parameters:
key
- the key to usevalue
- the value to use, can beLuaValue.NIL
, must not be null
-
rawset
Description copied from class:LuaTable
caller must ensure key is not nil- Overrides:
rawset
in classLuaTable
- Parameters:
key
- the key to use, must not beLuaValue.NIL
or nullvalue
- the value to use, can beLuaValue.NIL
, must not be null
-
remove
Description copied from class:LuaTable
Remove the element at a position in a list-table- Overrides:
remove
in classLuaTable
- Parameters:
pos
- the position to remove- Returns:
- The removed item, or
LuaValue.NONE
if not removed
-
tostring
Description copied from class:LuaValue
Conditionally convert to lua string without throwing errors.In lua all numbers are strings, so this function will return the
LuaValue
this
if it is a string or number, andLuaValue.NIL
for all other cases.This allows values to be tested for their "string-ness" without the penalty of throwing exceptions.
- Overrides:
tostring
in classLuaValue
- Returns:
this
if it is aLuaString
orLuaNumber
, otherwiseLuaValue.NIL
- See Also:
-