|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.luaj.vm.LValue
public abstract class LValue
| Field Summary | |
|---|---|
static LString |
TM_INDEX
Metatable tag for intercepting table gets |
static LString |
TM_METATABLE
Metatable tag for intercepting table sets |
static LString |
TM_MODE
Metatable tag for setting table mode |
static LString |
TM_NEWINDEX
Metatable tag for intercepting table sets |
| Constructor Summary | |
|---|---|
LValue()
|
|
| Method Summary | |
|---|---|
protected static LValue |
compareError(java.lang.Object typea,
java.lang.Object typeb)
|
protected void |
conversionError(java.lang.String target)
|
java.lang.String |
id()
|
boolean |
isClosure()
Returns true if this is a lua closure, false otherwise |
boolean |
isFunction()
Return true if this is a LFunction |
boolean |
isInteger()
Return true if this value can be represented as an "int" |
boolean |
isNil()
Return true if this value is LNil.NIL, false otherwise |
boolean |
isNumber()
Returns true if this is or can be made into a number |
boolean |
isString()
Return true if this is a lua string, meaning it is either a LString or LNumber,since all numbers are convertible to strings in lua |
boolean |
isTable()
Return true if this is a LTable |
boolean |
isUserData()
Returns true if this is an LUserData |
LString |
luaAsString()
Get the value as a LString |
boolean |
luaBinCmpDouble(int opcode,
double rhs)
|
boolean |
luaBinCmpInteger(int opcode,
int rhs)
|
boolean |
luaBinCmpString(int opcode,
LString rhs)
|
boolean |
luaBinCmpUnknown(int opcode,
LValue lhs)
|
LValue |
luaBinOpDouble(int opcode,
double m_value)
|
LValue |
luaBinOpInteger(int opcode,
int m_value)
|
LValue |
luaBinOpUnknown(int opcode,
LValue lhs)
|
void |
luaConcatTo(java.io.ByteArrayOutputStream baos)
Concatenate this value to a ByteArrayOutputStream |
LTable |
luaGetEnv(LTable d)
Get the environment of the object if it is a closure, or d if not a closure. |
LTable |
luaGetMetatable()
Valid for all types: get a metatable. |
LValue |
luaGetTable(LuaState vm,
LValue key)
Dispatch a gettable operation. |
abstract int |
luaGetType()
Valid for all types: return the int value identifying the type of this value |
LString |
luaGetTypeName()
Valid for all types: return the type of this value as an LString |
int |
luaLength()
Built-in opcode LEN, for Strings and Tables |
boolean |
luaSetEnv(LTable t)
Set the environment if a thread, or closure, and return true, otherwise return false |
LTable |
luaSetMetatable(LValue metatable)
Valid for tables |
void |
luaSetTable(LuaState vm,
LValue key,
LValue val)
Dispatch a settable operation. |
boolean |
luaStackCall(LuaState vm)
|
LValue |
luaToNumber()
Convert to a number if possible, or nil otherwise |
LValue |
luaUnaryMinus()
Arithmetic negative |
boolean |
toJavaBoolean()
Return value as a boolean |
java.lang.Boolean |
toJavaBoxedBoolean()
Convert to a Boolean value |
java.lang.Byte |
toJavaBoxedByte()
Convert to a Byte value |
java.lang.Character |
toJavaBoxedCharacter()
Convert to a boxed Character value |
java.lang.Double |
toJavaBoxedDouble()
Convert to a boxed Double value |
java.lang.Float |
toJavaBoxedFloat()
Convert to a boxed Float value |
java.lang.Integer |
toJavaBoxedInteger()
Convert to a boxed Integer value |
java.lang.Long |
toJavaBoxedLong()
Convert to a boxed Long value |
java.lang.Short |
toJavaBoxedShort()
Convert to a boxed Short value |
byte |
toJavaByte()
Return value as a byte |
char |
toJavaChar()
Return value as a char |
double |
toJavaDouble()
Return value as a double |
float |
toJavaFloat()
Return value as a float |
java.lang.Object |
toJavaInstance()
Convert to a Java Object iff this is a LUserData value |
int |
toJavaInt()
Return value as an integer |
long |
toJavaLong()
Return value as a long |
short |
toJavaShort()
Return value as a double |
java.lang.String |
toJavaString()
Convert to a Java String |
java.lang.String |
toString()
Override standard toString with lua String conversion by default |
LValue |
toStrongReference()
Dereference a potentially weak reference, and return the value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final LString TM_INDEX
public static final LString TM_NEWINDEX
public static final LString TM_METATABLE
public static final LString TM_MODE
| Constructor Detail |
|---|
public LValue()
| Method Detail |
|---|
protected void conversionError(java.lang.String target)
protected static LValue compareError(java.lang.Object typea,
java.lang.Object typeb)
public java.lang.String id()
public boolean isInteger()
public boolean isNil()
public boolean luaStackCall(LuaState vm)
public LValue luaBinOpUnknown(int opcode,
LValue lhs)
public LValue luaBinOpInteger(int opcode,
int m_value)
public LValue luaBinOpDouble(int opcode,
double m_value)
public boolean luaBinCmpUnknown(int opcode,
LValue lhs)
public boolean luaBinCmpString(int opcode,
LString rhs)
public boolean luaBinCmpInteger(int opcode,
int rhs)
public boolean luaBinCmpDouble(int opcode,
double rhs)
public void luaSetTable(LuaState vm,
LValue key,
LValue val)
public LValue luaGetTable(LuaState vm,
LValue key)
public LString luaAsString()
public java.lang.String toString()
toString in class java.lang.Objectpublic LValue luaUnaryMinus()
public int luaLength()
public LTable luaGetMetatable()
public LTable luaSetMetatable(LValue metatable)
the - new LTable, or null or LNil.NIL to reset the metatable to none
public abstract int luaGetType()
public LString luaGetTypeName()
public java.lang.String toJavaString()
public boolean toJavaBoolean()
public byte toJavaByte()
public char toJavaChar()
public double toJavaDouble()
public float toJavaFloat()
public int toJavaInt()
public long toJavaLong()
public short toJavaShort()
public java.lang.Boolean toJavaBoxedBoolean()
public java.lang.Byte toJavaBoxedByte()
public java.lang.Character toJavaBoxedCharacter()
public java.lang.Double toJavaBoxedDouble()
public java.lang.Float toJavaBoxedFloat()
public java.lang.Integer toJavaBoxedInteger()
public java.lang.Long toJavaBoxedLong()
public java.lang.Short toJavaBoxedShort()
public java.lang.Object toJavaInstance()
public boolean luaSetEnv(LTable t)
public LTable luaGetEnv(LTable d)
d - global environment to return if this is not a closurepublic LValue luaToNumber()
public LValue toStrongReference()
public void luaConcatTo(java.io.ByteArrayOutputStream baos)
public boolean isString()
public boolean isTable()
public boolean isFunction()
public boolean isUserData()
public boolean isNumber()
public boolean isClosure()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||