public class CompilerChunkLoader extends Object implements org.classdump.luna.load.ChunkLoader
ClassLoader.| Modifier and Type | Method and Description |
|---|---|
org.classdump.luna.load.ChunkClassLoader |
getChunkClassLoader() |
org.classdump.luna.runtime.LuaFunction<?,?,?,?,?> |
loadTextChunk(org.classdump.luna.Variable env,
String chunkName,
String sourceText) |
static CompilerChunkLoader |
of(ClassLoader classLoader,
CompilerSettings compilerSettings,
String rootClassPrefix)
Returns a new instance of
CompilerChunkLoader that uses the specified
class loader classLoader to load classes it compiles using a new instance
of the Lua compiler with the settings compilerSettings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix. |
static CompilerChunkLoader |
of(ClassLoader classLoader,
LuaCompiler compiler,
String rootClassPrefix)
Returns a new instance of
CompilerChunkLoader that uses the specified
class loader classLoader to load classes it compiles using compiler,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix. |
static CompilerChunkLoader |
of(ClassLoader classLoader,
String rootClassPrefix)
Returns a new instance of
CompilerChunkLoader that uses the specified
class loader classLoader to load classes it compiles using a compiler
instantiated with default settings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix. |
static CompilerChunkLoader |
of(CompilerSettings compilerSettings,
String rootClassPrefix)
Returns a new instance of
CompilerChunkLoader that uses the class loader
that loaded the CompilerChunkLoader class to load classes it compiles using
a new instance of the Lua compiler with the settings compilerSettings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix. |
static CompilerChunkLoader |
of(LuaCompiler compiler,
String rootClassPrefix)
Returns a new instance of
CompilerChunkLoader that uses the class loader
that loaded the CompilerChunkLoader class to load classes it compiles using
compiler, with every main chunk class having the class name rootClassPrefix
followed by a monotonically-increasing integer suffix. |
static CompilerChunkLoader |
of(String rootClassPrefix)
Returns a new instance of
CompilerChunkLoader that uses the class loader
that loaded the CompilerChunkLoader class to load classes it compiles using
a compiler instantiated with
default settings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix. |
public static CompilerChunkLoader of(ClassLoader classLoader, LuaCompiler compiler, String rootClassPrefix)
CompilerChunkLoader that uses the specified
class loader classLoader to load classes it compiles using compiler,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix.classLoader - the class loader used by this chunk loader, must not be nullcompiler - the compiler instance used by this chunk loader, must not be nullrootClassPrefix - the class name prefix for compiled classes, must not be nullCompilerChunkLoaderNullPointerException - if classLoader, compiler
or rootClassPrefix is nullpublic static CompilerChunkLoader of(ClassLoader classLoader, CompilerSettings compilerSettings, String rootClassPrefix)
CompilerChunkLoader that uses the specified
class loader classLoader to load classes it compiles using a new instance
of the Lua compiler with the settings compilerSettings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix.classLoader - the class loader used by this chunk loader, must not be nullcompilerSettings - the compiler settings used to instantiate the compiler,
must not be nullrootClassPrefix - the class name prefix for compiled classes, must not be nullCompilerChunkLoaderNullPointerException - if classLoader, compilerSettings
or rootClassPrefix is nullpublic static CompilerChunkLoader of(ClassLoader classLoader, String rootClassPrefix)
CompilerChunkLoader that uses the specified
class loader classLoader to load classes it compiles using a compiler
instantiated with default settings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix.classLoader - the class loader used by this chunk loader, must not be nullrootClassPrefix - the class name prefix for compiled classes, must not be nullCompilerChunkLoaderNullPointerException - if classLoader or rootClassPrefix
is nullpublic static CompilerChunkLoader of(LuaCompiler compiler, String rootClassPrefix)
CompilerChunkLoader that uses the class loader
that loaded the CompilerChunkLoader class to load classes it compiles using
compiler, with every main chunk class having the class name rootClassPrefix
followed by a monotonically-increasing integer suffix.compiler - the compiler instance used by this chunk loader, must not be nullrootClassPrefix - the class name prefix for compiled classes, must not be nullCompilerChunkLoaderNullPointerException - compiler or rootClassPrefix is nullpublic static CompilerChunkLoader of(CompilerSettings compilerSettings, String rootClassPrefix)
CompilerChunkLoader that uses the class loader
that loaded the CompilerChunkLoader class to load classes it compiles using
a new instance of the Lua compiler with the settings compilerSettings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix.compilerSettings - the compiler settings used to instantiate the compiler,
must not be nullrootClassPrefix - the class name prefix for compiled classes, must not be nullCompilerChunkLoaderNullPointerException - if compilerSettings or rootClassPrefix
is nullpublic static CompilerChunkLoader of(String rootClassPrefix)
CompilerChunkLoader that uses the class loader
that loaded the CompilerChunkLoader class to load classes it compiles using
a compiler instantiated with
default settings,
with every main chunk class having the class name rootClassPrefix followed
by a monotonically-increasing integer suffix.rootClassPrefix - the class name prefix for compiled classes, must not be nullCompilerChunkLoaderNullPointerException - if rootClassPrefix is nullpublic org.classdump.luna.load.ChunkClassLoader getChunkClassLoader()
public org.classdump.luna.runtime.LuaFunction<?,?,?,?,?> loadTextChunk(org.classdump.luna.Variable env,
String chunkName,
String sourceText)
throws org.classdump.luna.load.LoaderException
loadTextChunk in interface org.classdump.luna.load.ChunkLoaderorg.classdump.luna.load.LoaderExceptionCopyright © 2016–2017. All rights reserved.