| 程序包 | 说明 |
|---|---|
| org.luaj.vm2 | |
| org.luaj.vm2.lib | |
| org.luaj.vm2.lib.jse |
| 限定符和类型 | 类和说明 |
|---|---|
class |
Globals
Global environment used by luaj.
|
class |
LuaBoolean
Extension of
LuaValue which can hold a Java boolean as its value. |
class |
LuaClosure
Extension of
LuaFunction which executes lua bytecode. |
class |
LuaDouble
Extension of
LuaNumber which can hold a Java double as its value. |
class |
LuaFunction
Base class for functions implemented in Java.
|
class |
LuaInteger
Extension of
LuaNumber which can hold a Java int as its value. |
class |
LuaList
Created by nirenr on 2019/10/20.
|
class |
LuaNil
Class to encapsulate behavior of the singleton instance
nil
There will be one instance of this class, LuaValue.NIL,
per Java virtual machine. |
class |
LuaNumber
Base class for representing numbers as lua values directly.
|
class |
LuaString
Subclass of
LuaValue for representing lua strings. |
class |
LuaTable
Subclass of
LuaValue for representing lua tables. |
class |
LuaThread
Subclass of
LuaValue that implements
a lua coroutine thread using Java Threads. |
class |
LuaUserdata |
class |
LuaUtf8String
Created by nirenr on 2020/1/4.
|
class |
LuaValue
Base class for all concrete lua type values.
|
class |
TailcallVarargs
Subclass of
Varargs that represents a lua tail call
in a Java library function execution environment. |
| 限定符和类型 | 方法和说明 |
|---|---|
Varargs |
Varargs.dealias()
Return Varargs that cannot be using a shared array for the storage, and is flattened.
|
Varargs |
TailcallVarargs.eval() |
Varargs |
Varargs.eval()
Evaluate any pending tail call and return result.
|
protected Varargs |
LuaClosure.execute(LuaValue[] stack,
Varargs varargs) |
Varargs |
LuaList.inext(LuaValue key)
Get the next element after a particular key in the
contiguous array part of a table
|
Varargs |
LuaValue.inext(LuaValue index)
Find the next integer-key,value pair if
this is a table,
return LuaValue.NIL if there are no more, or throw a LuaError if not a table. |
Varargs |
LuaTable.inext(LuaValue key)
Get the next element after a particular key in the
contiguous array part of a table
|
Varargs |
LuaValue.invoke()
Call
this with 0 arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(LuaValue[] args)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(LuaValue[] args,
Varargs varargs)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(LuaValue arg1,
LuaValue arg2,
Varargs varargs)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(LuaValue arg,
Varargs varargs)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(Varargs args)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaClosure.invoke(Varargs varargs) |
Varargs |
LuaValue.invokemethod(LuaValue name)
Call named method on
this with 0 arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invokemethod(LuaValue name,
LuaValue[] args)
Call named method on
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invokemethod(LuaValue name,
Varargs args)
Call named method on
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invokemethod(String name)
Call named method on
this with 0 arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invokemethod(String name,
LuaValue[] args)
Call named method on
this with 1 argument, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invokemethod(String name,
Varargs args)
Call named method on
this with 1 argument, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaThread.State.lua_resume(LuaThread new_thread,
Varargs args) |
Varargs |
LuaThread.State.lua_yield(Varargs args) |
Varargs |
LuaList.next(LuaValue key)
Get the next element after a particular key in the table
|
Varargs |
LuaValue.next(LuaValue index)
Find the next key,value pair if
this is a table,
return LuaValue.NIL if there are no more, or throw a LuaError if not a table. |
Varargs |
LuaTable.next(LuaValue key)
Get the next element after a particular key in the table
|
Varargs |
LuaValue.onInvoke(Varargs args)
Callback used during tail call processing to invoke the function once.
|
Varargs |
LuaClosure.onInvoke(Varargs varargs) |
Varargs |
LuaThread.resume(Varargs args) |
Varargs |
TailcallVarargs.subargs(int start) |
Varargs |
LuaValue.subargs(int start)
Create a
Varargs instance containing arguments starting at index start |
abstract Varargs |
Varargs.subargs(int start)
Create a
Varargs instance containing arguments starting at index start |
static Varargs |
LuaValue.tailcallOf(LuaValue func,
Varargs args)
Construct a
TailcallVarargs around a function and arguments. |
Varargs |
LuaList.unpack()
Unpack all the elements of this table
|
Varargs |
LuaTable.unpack()
Unpack all the elements of this table
|
Varargs |
LuaList.unpack(int i)
Unpack all the elements of this table from element i
|
Varargs |
LuaTable.unpack(int i)
Unpack all the elements of this table from element i
|
Varargs |
LuaList.unpack(int i,
int j)
Unpack the elements from i to j inclusive
|
Varargs |
LuaTable.unpack(int i,
int j)
Unpack the elements from i to j inclusive
|
static Varargs |
LuaValue.varargsOf(LuaValue[] v)
|
static Varargs |
LuaValue.varargsOf(LuaValue[] v,
int offset,
int length)
|
static Varargs |
LuaValue.varargsOf(LuaValue[] v,
int offset,
int length,
Varargs more)
|
static Varargs |
LuaValue.varargsOf(LuaValue[] v,
Varargs r)
|
static Varargs |
LuaValue.varargsOf(LuaValue v1,
LuaValue v2,
Varargs v3)
|
static Varargs |
LuaValue.varargsOf(LuaValue v,
Varargs r)
|
Varargs |
Globals.yield(Varargs args)
Function which yields the current thread.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected Varargs |
LuaClosure.execute(LuaValue[] stack,
Varargs varargs) |
Varargs |
LuaValue.invoke(LuaValue[] args,
Varargs varargs)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(LuaValue arg1,
LuaValue arg2,
Varargs varargs)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(LuaValue arg,
Varargs varargs)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invoke(Varargs args)
Call
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaClosure.invoke(Varargs varargs) |
Varargs |
LuaValue.invokemethod(LuaValue name,
Varargs args)
Call named method on
this with variable arguments, including metatag processing,
and retain all return values in a Varargs. |
Varargs |
LuaValue.invokemethod(String name,
Varargs args)
Call named method on
this with 1 argument, including metatag processing,
and retain all return values in a Varargs. |
static LuaTable |
LuaValue.listOf(LuaValue[] unnamedValues,
Varargs lastarg)
Construct a
LuaTable initialized with supplied array values. |
Varargs |
LuaThread.State.lua_resume(LuaThread new_thread,
Varargs args) |
Varargs |
LuaThread.State.lua_yield(Varargs args) |
Varargs |
LuaValue.onInvoke(Varargs args)
Callback used during tail call processing to invoke the function once.
|
Varargs |
LuaClosure.onInvoke(Varargs varargs) |
static void |
Print.printStack(LuaValue[] stack,
int top,
Varargs varargs) |
static void |
Print.printState(LuaClosure cl,
int pc,
LuaValue[] stack,
int top,
Varargs varargs)
Print the state of a
LuaClosure that is being executed |
void |
LuaValue.rawsetlist(int key0,
Varargs values)
Set list values in a table without invoking metatag processing
Primarily used internally in response to a SETLIST bytecode.
|
Varargs |
LuaThread.resume(Varargs args) |
static LuaTable |
LuaValue.tableOf(LuaValue[] namedValues,
LuaValue[] unnamedValues,
Varargs lastarg)
Construct a
LuaTable initialized with supplied named values and sequential elements in an array part and as varargs. |
static LuaTable |
LuaValue.tableOf(Varargs varargs,
int firstarg)
Construct a
LuaTable initialized with supplied array values. |
static Varargs |
LuaValue.tailcallOf(LuaValue func,
Varargs args)
Construct a
TailcallVarargs around a function and arguments. |
static Varargs |
LuaValue.varargsOf(LuaValue[] v,
int offset,
int length,
Varargs more)
|
static Varargs |
LuaValue.varargsOf(LuaValue[] v,
Varargs r)
|
static Varargs |
LuaValue.varargsOf(LuaValue v1,
LuaValue v2,
Varargs v3)
|
static Varargs |
LuaValue.varargsOf(LuaValue v,
Varargs r)
|
Varargs |
Globals.yield(Varargs args)
Function which yields the current thread.
|
| 构造器和说明 |
|---|
LuaList(Varargs varargs)
Construct table of unnamed elements.
|
LuaList(Varargs varargs,
int firstarg)
Construct table of unnamed elements.
|
LuaTable(LuaValue[] named,
LuaValue[] unnamed,
Varargs lastarg)
Construct table with named and unnamed parts.
|
LuaTable(Varargs varargs)
Construct table of unnamed elements.
|
LuaTable(Varargs varargs,
int firstarg)
Construct table of unnamed elements.
|
TailcallVarargs(LuaValue object,
LuaValue methodname,
Varargs args) |
TailcallVarargs(LuaValue f,
Varargs args) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
BaseLib
Subclass of
LibFunction which implements the lua basic library functions. |
class |
Bit32Lib
Subclass of LibFunction that implements the Lua standard
bit32 library. |
class |
CoroutineLib
Subclass of
LibFunction which implements the lua standard coroutine
library. |
class |
DebugLib
Subclass of
LibFunction which implements the lua standard debug
library. |
class |
IoLib
Abstract base class extending
LibFunction which implements the
core of the lua standard io library. |
protected class |
IoLib.File |
class |
LibFunction
Subclass of
LuaFunction common to Java functions exposed to lua. |
class |
MathLib
Subclass of
LibFunction which implements the lua standard math
library. |
protected static class |
MathLib.BinaryOp |
protected static class |
MathLib.UnaryOp |
class |
OneArgFunction
Abstract base class for Java function implementations that take one argument and
return one value.
|
class |
OsLib
Subclass of
LibFunction which implements the standard lua os library. |
class |
PackageLib
Subclass of
LibFunction which implements the lua standard package and module
library functions. |
class |
PackageLib.class_searcher |
class |
PackageLib.java_searcher |
static class |
PackageLib.loadlib |
class |
PackageLib.lua_searcher |
class |
PackageLib.module |
class |
PackageLib.preload_searcher |
class |
PackageLib.require
require (modname)
Loads the given module.
|
class |
PackageLib.searchpath |
class |
StringLib
Subclass of
LibFunction which implements the lua standard string
library. |
class |
TableLib
Subclass of
LibFunction which implements the lua standard table
library. |
class |
ThreeArgFunction
Abstract base class for Java function implementations that take two arguments and
return one value.
|
class |
TwoArgFunction
Abstract base class for Java function implementations that take two arguments and
return one value.
|
class |
Utf8Lib
Created by nirenr on 2020/1/4.
|
class |
VarArgFunction
Abstract base class for Java function implementations that takes varaiable arguments and
returns multiple return values.
|
class |
ZeroArgFunction
Abstract base class for Java function implementations that take no arguments and
return one value.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Varargs |
IoLib._file_close(LuaValue file) |
Varargs |
IoLib._file_flush(LuaValue file) |
Varargs |
IoLib._file_lines(Varargs args) |
Varargs |
IoLib._file_read(LuaValue file,
Varargs subargs) |
Varargs |
IoLib._file_seek(LuaValue file,
String whence,
int offset) |
Varargs |
IoLib._file_setvbuf(LuaValue file,
String mode,
int size) |
Varargs |
IoLib._file_write(LuaValue file,
Varargs subargs) |
Varargs |
IoLib._io_close(LuaValue file) |
Varargs |
IoLib._io_flush() |
Varargs |
IoLib._io_index(LuaValue v) |
Varargs |
IoLib._io_input(LuaValue file) |
Varargs |
IoLib._io_lines(Varargs args) |
Varargs |
IoLib._io_open(String filename,
String mode) |
Varargs |
IoLib._io_output(LuaValue filename) |
Varargs |
IoLib._io_popen(String prog,
String mode) |
Varargs |
IoLib._io_read(Varargs args) |
Varargs |
IoLib._io_tmpfile() |
Varargs |
IoLib._io_type(LuaValue obj) |
Varargs |
IoLib._io_write(Varargs args) |
Varargs |
IoLib._lines_iter(LuaValue file,
boolean toclose,
Varargs args) |
protected Varargs |
OsLib.execute(String command)
This function is equivalent to the C function system.
|
Varargs |
TwoArgFunction.invoke(Varargs varargs) |
Varargs |
ThreeArgFunction.invoke(Varargs varargs) |
Varargs |
ZeroArgFunction.invoke(Varargs varargs) |
Varargs |
OneArgFunction.invoke(Varargs varargs) |
Varargs |
PackageLib.loadlib.invoke(Varargs args) |
Varargs |
PackageLib.preload_searcher.invoke(Varargs args) |
Varargs |
PackageLib.lua_searcher.invoke(Varargs args) |
Varargs |
PackageLib.searchpath.invoke(Varargs args) |
Varargs |
PackageLib.java_searcher.invoke(Varargs args) |
Varargs |
PackageLib.class_searcher.invoke(Varargs args) |
Varargs |
PackageLib.module.invoke(Varargs args) |
Varargs |
VarArgFunction.invoke(Varargs args)
Subclass responsibility.
|
Varargs |
LibFunction.invoke(Varargs args) |
Varargs |
BaseLib.loadFile(String filename,
String mode,
LuaValue env)
Load from a named file, returning the chunk or nil,error of can't load
|
Varargs |
BaseLib.loadStream(InputStream is,
String chunkname,
String mode,
LuaValue env) |
Varargs |
VarArgFunction.onInvoke(Varargs args) |
| 限定符和类型 | 方法和说明 |
|---|---|
Varargs |
IoLib._file_lines(Varargs args) |
Varargs |
IoLib._file_read(LuaValue file,
Varargs subargs) |
Varargs |
IoLib._file_write(LuaValue file,
Varargs subargs) |
Varargs |
IoLib._io_lines(Varargs args) |
Varargs |
IoLib._io_read(Varargs args) |
Varargs |
IoLib._io_write(Varargs args) |
Varargs |
IoLib._lines_iter(LuaValue file,
boolean toclose,
Varargs args) |
Varargs |
TwoArgFunction.invoke(Varargs varargs) |
Varargs |
ThreeArgFunction.invoke(Varargs varargs) |
Varargs |
ZeroArgFunction.invoke(Varargs varargs) |
Varargs |
OneArgFunction.invoke(Varargs varargs) |
Varargs |
PackageLib.loadlib.invoke(Varargs args) |
Varargs |
PackageLib.preload_searcher.invoke(Varargs args) |
Varargs |
PackageLib.lua_searcher.invoke(Varargs args) |
Varargs |
PackageLib.searchpath.invoke(Varargs args) |
Varargs |
PackageLib.java_searcher.invoke(Varargs args) |
Varargs |
PackageLib.class_searcher.invoke(Varargs args) |
Varargs |
PackageLib.module.invoke(Varargs args) |
Varargs |
VarArgFunction.invoke(Varargs args)
Subclass responsibility.
|
Varargs |
LibFunction.invoke(Varargs args) |
void |
DebugLib.onCall(LuaClosure c,
Varargs varargs,
LuaValue[] stack) |
void |
DebugLib.onInstruction(int pc,
Varargs v,
int top) |
Varargs |
VarArgFunction.onInvoke(Varargs args) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
JseBaseLib
Subclass of
BaseLib and LibFunction which implements the lua basic library functions
and provides a directory based ResourceFinder as the Globals.finder. |
class |
JseIoLib
Subclass of
IoLib and therefore LibFunction which implements the lua standard io
library for the JSE platform. |
class |
JseMathLib
Subclass of
LibFunction which implements the lua standard math
library. |
class |
JseOsLib
Subclass of
LibFunction which implements the standard lua os library. |
class |
JseStringLib |
class |
LuajavaLib
Subclass of
LibFunction which implements the features of the luajava package. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Varargs |
JseOsLib.execute(String command) |
Varargs |
LuajavaLib.invoke(Varargs args) |
static Varargs |
JsePlatform.luaMain(LuaValue mainChunk,
String[] args)
Simple wrapper for invoking a lua function with command line arguments.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Varargs |
LuajavaLib.invoke(Varargs args) |
Copyright © 2020. All rights reserved.