On invocation, will pick the best method from the list, and invoke it.
This class is not used directly. It is returned by calls to calls to {@link JavaInstance#get(LuaValue key)} when an overloaded method is named.
111112113114115116117118119120121
private void fakeWikiBase() { // fake http://www.mediawiki.org/wiki/Extension:Wikibase final LuaValue mw = globals.get("mw"); final LuaTable wikibase = new LuaTable(); wikibase.set("getEntity", new ZeroArgFunction() { @Override public LuaValue call() { return NIL; } }); mw.set("wikibase", wikibase);
159160161162163164165166167168169
} }; } private LuaValue isSubsting() { return new ZeroArgFunction() { @Override public LuaValue call() { // TODO return FALSE; } };
168169170171172173174175176177178
} }; } private LuaValue incrementExpensiveFunctionCount() { return new ZeroArgFunction() { @Override public LuaValue call() { if (++expensiveFunctionCount > MAX_EXPENSIVE_CALLS) { error("too many expensive function calls"); } return NIL;
919293949596979899100101
} }; } private LuaValue getContLangCode() { return new ZeroArgFunction() { @Override public LuaValue call() { return valueOf("en"); } };
1920212223242526272829
table.set("getEntityTable", getEntityTable()); return table; } private LuaValue getEntityTable() { return new ZeroArgFunction() { @Override public LuaValue call() { return NIL; } };
4041424344454647484950
private final Globals globals = new Globals(); private final PackageLib packageLib; public LuaInstance() throws AerospikeException { globals.load(new JseBaseLib()); packageLib = new PackageLib(); globals.load(packageLib); //globals.load(new Bit32Lib()); // not needed for 5.1 compatibility globals.load(new TableLib()); globals.load(new StringLib());
4849505152535455565758
//globals.load(new Bit32Lib()); // not needed for 5.1 compatibility 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()); globals.load(new DebugLib()); globals.load(new LuaBytesLib(this)); globals.load(new LuaListLib(this));
4748495051525354555657
globals.load(packageLib); //globals.load(new Bit32Lib()); // not needed for 5.1 compatibility 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()); globals.load(new DebugLib()); globals.load(new LuaBytesLib(this));
4950515253545556575859
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()); globals.load(new DebugLib()); globals.load(new LuaBytesLib(this)); globals.load(new LuaListLib(this)); globals.load(new LuaMapLib(this));
5051525354555657585960
globals.load(new StringLib()); globals.load(new CoroutineLib()); globals.load(new JseMathLib()); globals.load(new JseIoLib()); globals.load(new JseOsLib()); globals.load(new LuajavaLib()); globals.load(new DebugLib()); globals.load(new LuaBytesLib(this)); globals.load(new LuaListLib(this)); globals.load(new LuaMapLib(this)); globals.load(new LuaStreamLib(this));