Class Value


  • public class Value
    extends Object
    • Field Detail

      • TRUE

        public static final Value TRUE
      • FALSE

        public static final Value FALSE
      • EXTREF_NULL

        public static final Value EXTREF_NULL
      • FUNCREF_NULL

        public static final Value FUNCREF_NULL
      • EMPTY_VALUES

        public static final Value[] EMPTY_VALUES
      • TWO_POW_64

        public static final BigInteger TWO_POW_64
    • Constructor Detail

      • Value

        public Value​(ValueType type,
                     int value)
      • Value

        public Value​(ValueType type,
                     long value)
    • Method Detail

      • fromFloat

        public static Value fromFloat​(float data)
      • fromDouble

        public static Value fromDouble​(double 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​(long data)
      • funcRef

        public static Value funcRef​(long 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()
      • data

        public byte[] data()
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object