public interface Converter
| Modifier and Type | Method and Description |
|---|---|
void |
convertJavaObject(LuaState luaState,
Object object)
Converts a Java object to a Lua value and pushes that value on the stack.
|
<T> T |
convertLuaValue(LuaState luaState,
int index,
Class<T> formalType)
Converts a Lua value to a Java object of the specified formal type.
|
int |
getTypeDistance(LuaState luaState,
int index,
Class<?> formalType)
Returns the type distance between a Lua value and a formal Java type.
|
int getTypeDistance(LuaState luaState, int index, Class<?> formalType)
Integer.MAX_VALUE.luaState - the Lua stateindex - the stack index containing the valueformalType - the formal Java typeInteger.MAX_VALUE if the
conversion is not supported<T> T convertLuaValue(LuaState luaState, int index, Class<T> formalType)
If the Lua value is nil, the method returns
null.
luaState - the Lua stateindex - the stack index containing the valueformalType - the formal Java typenullClassCastException - if the conversion is not possible