Add LValue.toJavaX and VM.pushboxedx() functions for all java basic type conversions

This commit is contained in:
James Roseborough
2007-10-18 17:47:01 +00:00
parent ccde158514
commit 8e2ff119f9
23 changed files with 344 additions and 66 deletions

View File

@@ -8,23 +8,29 @@ public final class LBoolean extends LValue {
public static final LBoolean FALSE = new LBoolean("false",false);
private final String m_sname;
private final LString m_name;
private final boolean m_value;
private LBoolean( String name, boolean value ) {
this.m_sname = name;
this.m_name = new LString( name );
this.m_value = value;
}
public final String toJavaString() {
return m_sname;
}
public final LString luaAsString() {
return m_name;
}
public final boolean luaAsBoolean() {
public final boolean toJavaBoolean() {
return m_value;
}
public final int luaAsInt() {
public final int toJavaInt() {
return m_value? 1: 0;
}