public class LuaCompiler extends Object
| Constructor and Description |
|---|
LuaCompiler()
Constructs a new compiler instance with
default settings.
|
LuaCompiler(CompilerSettings settings)
Constructs a new compiler instance with the given settings.
|
| Modifier and Type | Method and Description |
|---|---|
CompiledModule |
compile(String sourceText,
String sourceFileName,
String rootClassName)
Compiles the Lua source string
sourceText into Java bytecode, giving the main
class the name rootClassName, and using sourceFileName as the name
of the source file (for debugging information), |
CompilerSettings |
settings()
Returns the settings used in this compiler instance.
|
public LuaCompiler(CompilerSettings settings)
settings - the settings, must not be nullNullPointerException - if settings is nullpublic LuaCompiler()
public CompilerSettings settings()
public CompiledModule compile(String sourceText, String sourceFileName, String rootClassName) throws ParseException, TokenMgrError
sourceText into Java bytecode, giving the main
class the name rootClassName, and using sourceFileName as the name
of the source file (for debugging information),sourceText - source text, must not be nullsourceFileName - file name of the source, must not be nullrootClassName - class name of the main class, must not be nullsourceText compiled into a loadable moduleNullPointerException - if sourceText, sourceFileName
or rootClassName is nullTokenMgrError - when sourceText cannot be lexically analysed following
the Lua lexical rulesParseException - when sourceText cannot be parsed following the Lua
grammarCopyright © 2016–2017. All rights reserved.