Package party.iroiro.luajava.lua54
Class Lua54
java.lang.Object
party.iroiro.luajava.AbstractLua
party.iroiro.luajava.lua54.Lua54
- All Implemented Interfaces:
AutoCloseable,Lua,LuaThread
A thin wrapper around a Lua 5.4 Lua state
-
Nested Class Summary
Nested classes/interfaces inherited from interface party.iroiro.luajava.Lua
Lua.Conversion, Lua.LuaType -
Field Summary
Fields inherited from class party.iroiro.luajava.AbstractLua
C, id, instances, L, loader, mainThread, recordedReferences, recyclableReferences, requireFunction, subThreadsFields inherited from interface party.iroiro.luajava.Lua
GLOBAL_THROWABLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionLua54()Creates a new Lua stateprotectedLua54(long L, int id, AbstractLua main) -
Method Summary
Modifier and TypeMethodDescriptionconvertError(int code) Converts a native error code to a LuaError enum value.convertType(int code) Converts a native type code to a LuaType enum value.protected AbstractLuanewThread(long L, int id, AbstractLua mainThread) Creates a new sub-thread attached to this main thread.Methods inherited from class party.iroiro.luajava.AbstractLua
addSubThread, checkError, checkStack, close, concat, createProxy, createTable, dump, equal, error, error, eval, from, from, from, from, from, fromNull, gc, get, get, getField, getGlobal, getId, getJavaError, getLuaNatives, getMainState, getMetaField, getMetatable, getPointer, getRegisteredMetatable, getTable, getTop, insert, invokeSpecial, isBoolean, isClosed, isFunction, isInteger, isJavaObject, isNil, isNone, isNoneOrNil, isNumber, isString, isTable, isThread, isUserdata, lessThan, load, load, loadExternal, newRegisteredMetatable, newTable, newThread, next, openLibraries, openLibrary, pCall, pop, push, push, push, push, push, push, push, push, push, push, push, pushArray, pushJavaArray, pushJavaClass, pushJavaObject, pushJavaObjectOrArray, pushNil, pushThread, pushValue, rawEqual, rawGet, rawGetI, rawLength, rawSet, rawSetI, ref, ref, refGet, register, remove, replace, require, resume, run, run, set, setExternalLoader, setField, setGlobal, setMetatable, setTable, setTop, shouldSynchronize, status, toAbsoluteIndex, toBoolean, toBuffer, toDirectBuffer, toInteger, toJavaObject, toList, toMap, toNumber, toObject, toObject, toString, type, unref, unRef, xMove, yield
-
Constructor Details
-
Lua54
Creates a new Lua state- Throws:
LinkageError- if Lua 5.4 natives unavailable
-
Lua54
-
-
Method Details
-
newThread
Description copied from class:AbstractLuaCreates a new sub-thread attached to this main thread.- Specified by:
newThreadin classAbstractLua- Parameters:
L- the pointer to the new Lua stateid- the unique identifier for the new statemainThread- the main thread this state belongs to- Returns:
- the new sub-thread
-
convertError
Description copied from class:AbstractLuaConverts a native error code to a LuaError enum value.- Specified by:
convertErrorin classAbstractLua- Parameters:
code- the native error code- Returns:
- the corresponding LuaError value
-
convertType
Description copied from class:AbstractLuaConverts a native type code to a LuaType enum value.- Specified by:
convertTypein classAbstractLua- Parameters:
code- the native type code- Returns:
- the corresponding LuaType value
-