本文整理汇总了Java中org.luaj.vm2.lib.Bit32Lib类的典型用法代码示例。如果您正苦于以下问题:Java Bit32Lib类的具体用法?Java Bit32Lib怎么用?Java Bit32Lib使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bit32Lib类属于org.luaj.vm2.lib包,在下文中一共展示了Bit32Lib类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: standardGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Create a standard set of globals for JSE including all the libraries.
*
* @return Table of globals initialized with the standard JSE libraries
* @see #debugGlobals()
* @see JsePlatform
* @see JmePlatform
*/
public static Globals standardGlobals() {
Globals globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JseMathLib());
globals.load(new JseOsLib());
// globals.load(new JseIoLib());//安全考虑,删除for LuaView
// globals.load(new LuajavaLib());//安全考虑,删除for LuaView
LoadState.install(globals);
LuaC.install(globals);
return globals;
}
示例2: main
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
//Globals globals = JsePlatform.standardGlobals();
Globals globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JseMathLib());
globals.load(new JseIoLib());
globals.load(new JseOsLib());
globals.load(new JavaLibInteractionTest());
LoadState.install(globals);
LuaC.install(globals);
System.out.println(new File(".").getAbsolutePath());
System.out.println(new File(args[0]).exists());
LuaValue chunk = globals.loadfile(new File(args[0]).getAbsolutePath());
chunk.call();
}
示例3: standardGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Create a standard set of globals for JSE including all the libraries.
*
* @return Table of globals initialized with the standard JSE libraries
* @see #debugGlobals()
* @see JsePlatform
* @see org.luaj.vm2.lib.jme.JmePlatform
*/
public static Globals standardGlobals() {
Globals globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JseMathLib());
globals.load(new JseIoLib());
globals.load(new JseOsLib());
globals.load(new LuajavaLib());
LoadState.install(globals);
LuaC.install(globals);
return globals;
}
示例4: standardGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Create a standard set of globals for JSE including all the libraries.
*
* @return Table of globals initialized with the standard JSE libraries
* @see #debugGlobals()
* @see JsePlatform
* @see JmePlatform
*/
public static Globals standardGlobals() {
Globals globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JseMathLib());
globals.load(new JseIoLib());
globals.load(new JseOsLib());
globals.load(new LuajavaLib());
LoadState.install(globals);
LuaC.install(globals);
return globals;
}
示例5: LuaEngine
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
private LuaEngine() {
globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JseMathLib());
globals.load(new JseIoLib());
globals.load(new JseOsLib());
globals.load(new MultiDexLuajavaLib());
LoadState.install(globals);
LuaC.install(globals);
globals.finder = this;
globals.set("loadResource", new resLoader());
}
示例6: standardGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Create a standard set of globals for JME including all the libraries.
*
* @return Table of globals initialized with the standard JME libraries
* @see #debugGlobals()
* @see JsePlatform
* @see JmePlatform
*/
public static Globals standardGlobals() {
Globals globals = new Globals();
globals.load(new BaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new OsLib());
globals.load(new MathLib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JmeIoLib());
LoadState.install(globals);
LuaC.install(globals);
return globals;
}
示例7: loadCoreLibs
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
public static void loadCoreLibs() {
GLOBAL_PATH.load(new JseBaseLib());
GLOBAL_PATH.load(new PackageLib());
GLOBAL_PATH.load(new Bit32Lib());
GLOBAL_PATH.load(new TableLib());
GLOBAL_PATH.load(new StringLib());
GLOBAL_PATH.load(new CoroutineLib());
GLOBAL_PATH.load(new JseMathLib());
GLOBAL_PATH.load(new JseIoLib());
GLOBAL_PATH.load(new JseOsLib());
}
示例8: getLocalCompiler
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
private Globals getLocalCompiler() {
Globals user_globals = new Globals();
user_globals.load(new JseBaseLib());
user_globals.load(new PackageLib());
user_globals.load(new Bit32Lib());
user_globals.load(new TableLib());
user_globals.load(new StringLib());
user_globals.load(new JseMathLib());
user_globals.load(new DebugLib());
sethook = user_globals.get("debug").get("sethook");
user_globals.set("debug", LuaValue.NIL);
return user_globals;
}
示例9: standardGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Create a standard set of globals for JSE including all the libraries.
*
* @return Table of globals initialized with the standard JSE libraries
* @see #debugGlobals()
* @see org.luaj.vm2.lib.jse.JsePlatform
* @see org.luaj.vm2.lib.jme.JmePlatform
*/
public static Globals standardGlobals() {
Globals globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new JseMathLib());
globals.load(new JseOsLib());
LoadState.install(globals);
LuaC.install(globals);
return globals;
}
示例10: newStandard
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Create a new lua Globals object representing the standard one used in this game
*
* @return a new Globals instance
*/
public static Globals newStandard() {
Globals globals = new Globals();
globals.load(new JseBaseLib());
globals.load(new PackageLib());
globals.load(new Bit32Lib());
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new JseMathLib());
LoadState.install(globals);
LuaC.install(globals);
LuaJC.install(globals);
return globals;
}
示例11: loadDefaultLibs
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
private void loadDefaultLibs() {
environment.load(new PackageLib());
environment.load(new Bit32Lib());
environment.load(new StringLib());
environment.load(new TableLib());
environment.load(new JseBaseLib());
environment.load(new JseMathLib());
}
示例12: createSandboxedGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
private Globals createSandboxedGlobals() {
Globals result = new Globals();
result.load(new JseBaseLib());
result.load(new PackageLib());
result.load(new Bit32Lib());
result.load(new TableLib());
result.load(new StringLib());
result.load(new JseMathLib());
result.load(new DebugLib());
result.set("debug", LuaValue.NIL);
return result;
}
示例13: generateGlobals
import org.luaj.vm2.lib.Bit32Lib; //导入依赖的package包/类
/**
* Internal method.
*
* <p>Generates a {@link Globals} object with all Lua
* and Undertailor libraries loaded, used for all Lua
* operations of Undertailor.</p>
*/
private Globals generateGlobals() {
Globals returned = new Globals();
LoadState.install(returned);
LuaC.install(returned);
// core Lua libraries
returned.load(new JseBaseLib());
returned.load(new PackageLib());
returned.load(new DebugLib());
returned.load(new Bit32Lib());
returned.load(new TableLib());
returned.load(new StringLib());
returned.load(new JseMathLib());
returned.load(new JseOsLib());
// undertailor libraries
returned.load(new BaseLib(this));
returned.load(new OsLib());
returned.load(new GameLib(undertailor));
returned.load(new ColorsLib());
returned.load(new TextsLib(undertailor));
returned.load(new MetaLib());
// Clean the globals.
LuaValue lib = returned.get("os");
if (lib.istable()) {
lib.set("execute", LuaValue.NIL);
lib.set("exit", LuaValue.NIL);
lib.set("remove", LuaValue.NIL);
lib.set("rename", LuaValue.NIL);
lib.set("setlocale", LuaValue.NIL);
lib.set("tmpname", LuaValue.NIL);
}
returned.set("load", LuaValue.NIL);
returned.set("loadfile", LuaValue.NIL);
returned.set("collectgarbage", LuaValue.NIL);
returned.set("debug", LuaValue.NIL);
returned.set("package", LuaValue.NIL);
return returned;
}