Package se.krka.kahlua.vm
Class KahluaUtil
java.lang.Object
se.krka.kahlua.vm.KahluaUtil
public class KahluaUtil
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description KahluaUtil()
-
Method Summary
Modifier and Type Method Description static void
assertArgNotNull(java.lang.Object object, int int1, java.lang.String string, java.lang.String string2)
static boolean
boolEval(java.lang.Object object)
static void
fail(java.lang.String string)
static double
fromDouble(java.lang.Object object)
static java.lang.Object
getArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string)
static KahluaTable
getClassMetatables(Platform platform, KahluaTable kahluaTable)
static double
getDoubleArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string)
static java.lang.Double
getNumberArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string)
static java.lang.Object
getOptionalArg(LuaCallFrame luaCallFrame, int int1)
static java.lang.Double
getOptionalNumberArg(LuaCallFrame luaCallFrame, int int1)
static java.lang.String
getOptionalStringArg(LuaCallFrame luaCallFrame, int int1)
static KahluaTable
getOrCreateTable(Platform platform, KahluaTable kahluaTable, java.lang.String string)
static java.lang.String
getStringArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string)
static KahluaThread
getWorkerThread(Platform platform, KahluaTable kahluaTable)
static long
ipow(long long1, int int1)
static boolean
isNegative(double double1)
static int
len(KahluaTable kahluaTable, int int1, int int2)
static LuaClosure
loadByteCodeFromResource(java.lang.String string, KahluaTable kahluaTable)
static void
luaAssert(boolean boolean1, java.lang.String string)
static java.lang.String
numberToString(java.lang.Double Double1)
static java.lang.Double
rawTonumber(java.lang.Object object)
static java.lang.String
rawTostring(java.lang.Object object)
static java.lang.String
rawTostring2(java.lang.Object object)
static double
round(double double1)
static void
setupLibrary(KahluaTable kahluaTable, KahluaThread kahluaThread, java.lang.String string)
static void
setWorkerThread(KahluaTable kahluaTable, KahluaThread kahluaThread)
static java.lang.Boolean
toBoolean(boolean boolean1)
static java.lang.Double
toDouble(double double1)
static java.lang.Double
toDouble(long long1)
static java.lang.Double
tonumber(java.lang.String string)
static java.lang.Double
tonumber(java.lang.String string, int int1)
static java.lang.String
tostring(java.lang.Object object, KahluaThread kahluaThread)
static java.lang.String
type(java.lang.Object object)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
KahluaUtil
public KahluaUtil()
-
-
Method Details
-
fromDouble
public static double fromDouble(java.lang.Object object) -
toDouble
public static java.lang.Double toDouble(double double1) -
toDouble
public static java.lang.Double toDouble(long long1) -
toBoolean
public static java.lang.Boolean toBoolean(boolean boolean1) -
boolEval
public static boolean boolEval(java.lang.Object object) -
loadByteCodeFromResource
public static LuaClosure loadByteCodeFromResource(java.lang.String string, KahluaTable kahluaTable) -
luaAssert
public static void luaAssert(boolean boolean1, java.lang.String string) -
fail
public static void fail(java.lang.String string) -
round
public static double round(double double1) -
ipow
public static long ipow(long long1, int int1) -
isNegative
public static boolean isNegative(double double1) -
getClassMetatables
-
getWorkerThread
-
setWorkerThread
-
getOrCreateTable
public static KahluaTable getOrCreateTable(Platform platform, KahluaTable kahluaTable, java.lang.String string) -
setupLibrary
public static void setupLibrary(KahluaTable kahluaTable, KahluaThread kahluaThread, java.lang.String string) -
numberToString
public static java.lang.String numberToString(java.lang.Double Double1) -
type
public static java.lang.String type(java.lang.Object object) -
tostring
-
tonumber
public static java.lang.Double tonumber(java.lang.String string) -
tonumber
public static java.lang.Double tonumber(java.lang.String string, int int1) -
rawTostring
public static java.lang.String rawTostring(java.lang.Object object) -
rawTostring2
public static java.lang.String rawTostring2(java.lang.Object object) -
rawTonumber
public static java.lang.Double rawTonumber(java.lang.Object object) -
getStringArg
public static java.lang.String getStringArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string) -
getOptionalStringArg
-
getNumberArg
public static java.lang.Double getNumberArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string) -
getOptionalNumberArg
-
assertArgNotNull
public static void assertArgNotNull(java.lang.Object object, int int1, java.lang.String string, java.lang.String string2) -
getOptionalArg
-
getArg
public static java.lang.Object getArg(LuaCallFrame luaCallFrame, int int1, java.lang.String string) -
len
-
getDoubleArg
-