Java Code Examples for org.luaj.vm2.LuaValue#getmetatable()
The following examples show how to use
org.luaj.vm2.LuaValue#getmetatable() .
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: DebugLib.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
public Varargs invoke(Varargs args) { Object o = args.checkuserdata(1); LuaValue v = args.checkvalue(2); LuaUserdata u = (LuaUserdata) args.arg1(); u.m_instance = v.checkuserdata(); u.m_metatable = v.getmetatable(); return NONE; }
Example 2
Source File: DebugLib.java From XPrivacyLua with GNU General Public License v3.0 | 5 votes |
public Varargs invoke(Varargs args) { Object o = args.checkuserdata(1); LuaValue v = args.checkvalue(2); LuaUserdata u = (LuaUserdata) args.arg1(); u.m_instance = v.checkuserdata(); u.m_metatable = v.getmetatable(); return NONE; }
Example 3
Source File: DebugLib.java From HtmlNative with Apache License 2.0 | 5 votes |
public Varargs invoke(Varargs args) { Object o = args.checkuserdata(1); LuaValue v = args.checkvalue(2); LuaUserdata u = (LuaUserdata) args.arg1(); u.m_instance = v.checkuserdata(); u.m_metatable = v.getmetatable(); return NONE; }
Example 4
Source File: DebugLib.java From luaj with MIT License | 5 votes |
public Varargs invoke(Varargs args) { Object o = args.checkuserdata(1); LuaValue v = args.checkvalue(2); LuaUserdata u = (LuaUserdata) args.arg1(); u.m_instance = v.checkuserdata(); u.m_metatable = v.getmetatable(); return NONE; }
Example 5
Source File: DebugLib.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue v) { LuaValue mt = v.getmetatable(); return mt != null ? mt : NIL; }
Example 6
Source File: BaseLib.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue arg) { LuaValue mt = arg.getmetatable(); return mt != null ? mt.rawget(METATABLE).optvalue(mt) : NIL; }
Example 7
Source File: BaseLib.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue table, LuaValue metatable) { LuaValue mt0 = table.getmetatable(); if (mt0 != null && !mt0.rawget(METATABLE).isnil()) error("cannot change a protected metatable"); return table.setmetatable(metatable.isnil() ? null : metatable.checktable()); }
Example 8
Source File: DebugLib.java From XPrivacyLua with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue v) { LuaValue mt = v.getmetatable(); return mt != null? mt: NIL; }
Example 9
Source File: BaseLib.java From XPrivacyLua with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue arg) { LuaValue mt = arg.getmetatable(); return mt!=null? mt.rawget(METATABLE).optvalue(mt): NIL; }
Example 10
Source File: DebugLib.java From HtmlNative with Apache License 2.0 | 4 votes |
public LuaValue call(LuaValue v) { LuaValue mt = v.getmetatable(); return mt != null? mt: NIL; }
Example 11
Source File: BaseLib.java From HtmlNative with Apache License 2.0 | 4 votes |
public LuaValue call(LuaValue arg) { LuaValue mt = arg.getmetatable(); return mt != null ? mt.rawget(METATABLE).optvalue(mt) : NIL; }
Example 12
Source File: DebugLib.java From luaj with MIT License | 4 votes |
public LuaValue call(LuaValue v) { LuaValue mt = v.getmetatable(); return mt != null? mt: NIL; }
Example 13
Source File: BaseLib.java From luaj with MIT License | 4 votes |
public LuaValue call(LuaValue arg) { LuaValue mt = arg.getmetatable(); return mt!=null? mt.rawget(METATABLE).optvalue(mt): NIL; }