Java Code Examples for org.luaj.vm2.LuaFunction#isfunction()
The following examples show how to use
org.luaj.vm2.LuaFunction#isfunction() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VenvyMqttMapper.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
public LuaValue mqttCallback(U target, Varargs varargs) { final LuaFunction callback = varargs.optfunction(2, null); if (callback != null && callback.isfunction()) { return target.setMqttCallback(callback); } return LuaValue.NIL; }
Example 2
Source File: VenvyNotificationMapper.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
public LuaValue registerNotification(U target, Varargs args) { if (args.narg() > 0) { final String tag = LuaUtil.getString(args, 2); final LuaFunction callback = args.optfunction(3, null); if (TextUtils.isEmpty(tag)) { return LuaValue.NIL; } if (callback != null && callback.isfunction()) { return target.registerNotification(callback, tag); } } return LuaValue.NIL; }
Example 3
Source File: VenvyKeyboardMapper.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
public LuaValue keyboardCallback(U target, Varargs varargs) { final LuaFunction callback = varargs.optfunction(2, null); if (callback != null && callback.isfunction()) { return target.setKeyboardCallback(callback); } return LuaValue.NIL; }
Example 4
Source File: VenvyAcrCloudMapper.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
public LuaValue acrRecognizeCallback(U target, Varargs varargs) { final LuaFunction callback = varargs.optfunction(2, null); if (callback != null && callback.isfunction()) { return target.setAcrCloudCallback(callback); } return LuaValue.NIL; }