Class Val

    • Field Detail

      • vm

        public final Vm vm
        The vm.
    • Constructor Detail

      • Val

        public Val​(Vm vm)
        Constructs a val.
        Parameters:
        vm - the vm.
    • Method Detail

      • makeHostResultCore

        public HostResultCore makeHostResultCore()
        Description copied from interface: HostResult
        Returns the core of the result, which the executor handles.

        This method is intended to be used by the Kink runtime implementation. Do not call this method from your program.

        Specified by:
        makeHostResultCore in interface HostResult
        Returns:
        the core of the result.
      • getIdentity

        public final BigInteger getIdentity()
        Returns the identity number of this val.

        The identity number is unique within the vm.

        Returns:
        the identity number of this val.
      • setVar

        public void setVar​(int symHandle,
                           Val val)
        Assigns val to the var specified by symHandle.
        Parameters:
        symHandle - the sym handle of the var.
        val - the val to be assigned.
      • getVar

        @Nullable
        public Val getVar​(int symHandle)
        Returns the target of the var specified by sym; or null if absent.
        Parameters:
        symHandle - the sym handle of the var.
        Returns:
        the target of the var specified by sym; or null if absent.
      • hasVar

        public boolean hasVar​(int symHandle)
        Returns whether the val has the var specified by sym.
        Parameters:
        symHandle - the sym handle of the varl.
        Returns:
        true if the val has the var specified by sym.
      • getVarSymHandleSet

        public Set<Integer> getVarSymHandleSet()
        Returns the sym handle set of the vars of this val.
        Returns:
        the sym handle set of the vars of this val.
      • getCustomVarMapping

        public VarMapping getCustomVarMapping()
        Returns the var mapping for a val class.

        Override this method to provide vars common to the val class. The content of the var mapping is preferred than the common ones.

        Returns:
        the var mapping for a val class.