本文整理了Java中org.luaj.vm2.LuaTable.set()
方法的一些代码示例,展示了LuaTable.set()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LuaTable.set()
方法的具体详情如下:
包路径:org.luaj.vm2.LuaTable
类名称:LuaTable
方法名:set
[英]caller must ensure key is not nil
[中]调用方必须确保密钥不是nil
代码示例来源:origin: aerospike/aerospike-client-java
public listcode(LuaTable table, int id, String name) {
super.opcode = id;
super.name = name;
table.set(name, this);
}
代码示例来源:origin: com.aerospike/aerospike-client
public LuaValue call(LuaValue env) {
LuaTable meta = new LuaTable(0,1);
meta.set("__tostring", new tostring());
LuaTable table = new LuaTable(0,10);
table.setmetatable(meta);
table.set("read", new read());
table.set("readable", new readable());
table.set("writeable", new writeable());
table.set("write", new write());
instance.registerPackage("stream", table);
return table;
}
代码示例来源:origin: com.aerospike/aerospike-client
public listcode(LuaTable table, int id, String name) {
super.opcode = id;
super.name = name;
table.set(name, this);
}
代码示例来源:origin: com.aerospike/aerospike-client
public LuaValue call(LuaValue env) {
LuaTable meta = new LuaTable();
meta.set("__index", new index());
LuaTable table = new LuaTable();
table.setmetatable(meta);
instance.registerPackage("aerospike", table);
return table;
}
代码示例来源:origin: com.aerospike/aerospike-client
public bytesbool(LuaTable table, int id, String name) {
super.opcode = id;
super.name = name;
table.set(name, this);
}
代码示例来源:origin: com.aerospike/aerospike-client
public mapcode(LuaTable table, int id, String name) {
super.opcode = id;
super.name = name;
table.set(name, this);
}
代码示例来源:origin: info.bliki.wiki/bliki-core
private LuaTable stats() {
LuaTable stats = new LuaTable();
stats.set("pages", 0); // (int)SiteStats::pages(),
stats.set("articles", 0); // (int)SiteStats::articles(),
stats.set("files", 0); // (int)SiteStats::images(),
stats.set("edits", 0); // (int)SiteStats::edits(),
stats.set("views", NIL); // $wgDisableCounters ? null : (int)SiteStats::views(),
stats.set("users", 0); // (int)SiteStats::users(),
stats.set("activeUsers", 0); // (int)SiteStats::activeUsers(),
stats.set("admins", 0); // (int)SiteStats::numberingroup( 'sysop' ),
return stats;
}
代码示例来源:origin: info.bliki.wiki/bliki-core
@Override
public LuaValue getSetupOptions() {
LuaTable table = new LuaTable();
// https://www.mediawiki.org/wiki/Manual:$wgMaxArticleSize
// stringLengthLimit = $wgMaxArticleSize * 1024;
table.set("stringLengthLimit", 2048 * 1024);
table.set("patternLengthLimit", 10000);
return table;
}
}
代码示例来源:origin: info.bliki.wiki/bliki-core
@Override
public LuaValue getSetupOptions() {
LuaTable table = new LuaTable();
table.set("nowiki_protocols", new LuaTable());
table.set("comma", ", ");
table.set("and", " and ");
table.set("ellipsis", "...");
return table;
}
}
代码示例来源:origin: M66B/XPrivacyLua
/** Set the lua path used by this library instance to a new value.
* Merely sets the value of {@link path} to be used in subsequent searches. */
public void setLuaPath( String newLuaPath ) {
package_.set(_PATH, LuaValue.valueOf(newLuaPath));
}
代码示例来源:origin: info.bliki.wiki/bliki-core
@Override
public LuaValue getSetupOptions() {
LuaTable options = new LuaTable();
options.set("lang", "en");
return options;
}
代码示例来源:origin: hsllany/HtmlNative
/** Set the lua path used by this library instance to a new value.
* Merely sets the value of {@link path} to be used in subsequent searches. */
public void setLuaPath( String newLuaPath ) {
package_.set(_PATH, LuaValue.valueOf(newLuaPath));
}
代码示例来源:origin: info.bliki.wiki/bliki-core
@Override
public LuaTable getInterface() {
LuaTable iface = new LuaTable();
iface.set("plain", messagePlain());
iface.set("check", messageCheck());
return iface;
}
代码示例来源:origin: Tencent/RapidView
@Override
public LuaTable getEnv(){
LuaTable table = new LuaTable();
for( Map.Entry<String, String> entry : mMapEnvironment.entrySet() ){
table.set(LuaString.valueOf(entry.getKey()), LuaString.valueOf(entry.getValue()));
}
return table;
}
代码示例来源:origin: Tencent/RapidView
@Override
public LuaTable getEnv(){
LuaTable table = new LuaTable();
for( Map.Entry<String, String> entry : mMapEnvironment.entrySet() ){
table.set(LuaString.valueOf(entry.getKey()), LuaString.valueOf(entry.getValue()));
}
return table;
}
代码示例来源:origin: info.bliki.wiki/bliki-core
@Override public LuaValue call(LuaValue action) {
LuaTable table = new LuaTable();
table.set("restrictions", new LuaTable());
return table;
}
};
代码示例来源:origin: info.bliki.wiki/bliki-core
@Override
public LuaValue getSetupOptions() {
LuaTable table = new LuaTable();
table.set("thisTitle", title(wikiModel.getNamespaceName(), wikiModel.getPageName()));
table.set("NS_MEDIA", MEDIA_NAMESPACE_KEY.code);
return table;
}
代码示例来源:origin: Tencent/RapidView
@Override
public LuaValue call(LuaValue var1, LuaValue var2) {
LuaTable functions = new LuaTable();
functions.set("getRapidView", new GetPhotonView());
functions.set("getJavaBridge", new GetJavaBridge());
functions.set("getEnvironment", new GetEnvironment());
var2.set("rapid", functions);
var2.get("package").get("loaded").set("rapid", functions);
return functions;
}
代码示例来源:origin: com.aerospike/aerospike-client
private void loadSystemPackage(ClassLoader resourceLoader, String packageName) {
String resourcePath = "udf/" + packageName + ".lua";
Prototype prototype = LuaCache.loadPackageFromResource(resourceLoader, resourcePath, packageName);
LuaClosure function = new LuaClosure(prototype, globals);
function.invoke();
loadedTable.set(packageName, LuaValue.TRUE);
}
代码示例来源:origin: Tencent/RapidView
private static LuaTable arrayToTable(Object[] arrayObj){
LuaTable table = new LuaTable();
for( int i = 0; i < arrayObj.length; i++ ){
table.set( LuaInteger.valueOf( i + 1), CoerceJavaToLua.coerce(arrayObj[i]));
}
return table;
}
}
内容来源于网络,如有侵权,请联系作者删除!