Package com.dylibso.chicory.wasm.types
Class Value
- java.lang.Object
-
- com.dylibso.chicory.wasm.types.Value
-
public class Value extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Value[]EMPTY_VALUESstatic ValueEXTREF_NULLstatic ValueFALSEstatic ValueFUNCREF_NULLstatic intREF_NULL_VALUEstatic ValueTRUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byteasByte()doubleasDouble()intasExtRef()floatasFloat()intasFuncRef()intasInt()longasLong()shortasShort()longasUInt()byte[]data()booleanequals(Object v)static ValueexternRef(int data)static Valuef32(long data)static Valuef64(long data)static ValuefromDouble(double data)static ValuefromFloat(float data)static ValuefuncRef(int data)inthashCode()static Valuei32(int data)static Valuei32(long data)static Valuei64(long data)StringtoString()ValueTypetype()static Valuezero(ValueType valueType)Create a zeroed value for the particular type.
-
-
-
Field Detail
-
TRUE
public static final Value TRUE
-
FALSE
public static final Value FALSE
-
REF_NULL_VALUE
public static final int REF_NULL_VALUE
- See Also:
- Constant Field Values
-
EXTREF_NULL
public static final Value EXTREF_NULL
-
FUNCREF_NULL
public static final Value FUNCREF_NULL
-
EMPTY_VALUES
public static final Value[] EMPTY_VALUES
-
-
Method Detail
-
fromFloat
public static Value fromFloat(float data)
-
fromDouble
public static Value fromDouble(double data)
-
i32
public static Value i32(int data)
-
i32
public static Value i32(long data)
-
i64
public static Value i64(long data)
-
f32
public static Value f32(long data)
-
f64
public static Value f64(long data)
-
externRef
public static Value externRef(int data)
-
funcRef
public static Value funcRef(int data)
-
zero
public static Value zero(ValueType valueType)
Create a zeroed value for the particular type.- Parameters:
valueType- must be a valid zeroable type.- Returns:
- a zero.
-
asInt
public int asInt()
-
asUInt
public long asUInt()
-
asLong
public long asLong()
-
asByte
public byte asByte()
-
asShort
public short asShort()
-
asExtRef
public int asExtRef()
-
asFuncRef
public int asFuncRef()
-
asFloat
public float asFloat()
-
asDouble
public double asDouble()
-
type
public ValueType type()
-
data
public byte[] data()
-
-