Interface CallContext

All Superinterfaces:
HostContext

public interface CallContext extends HostContext
Context of a call of a host fun.

The context is valid during invocation of the lambda of HostFunBuilder.action(HostFunAction).

CallContext also supports HostContext interface, to call a function, raising an exception and so on.

See org.kink_lang.kink.hostfun for usage.

  • Method Summary

    Modifier and Type
    Method
    Description
    arg(int index)
    Returns the arg of the current call at the index.
    int
    Returns the number of args of the current call.
    Returns the recv of the current call.

    Methods inherited from interface org.kink_lang.kink.hostfun.HostContext

    call, call, call, call, raise, raise, traces
  • Method Details

    • recv

      Val recv()
      Returns the recv of the current call.
      Returns:
      the recv of the current call.
    • argCount

      int argCount()
      Returns the number of args of the current call.

      The number of the args is the size of the arguments vector of the current call.

      Returns:
      the number of the args.
    • arg

      Val arg(int index)
      Returns the arg of the current call at the index.

      The result will be the indexth element of the arguments vector of the current call.

      Precondition: index must be less than the result of argCount().

      Parameters:
      index - the index of the arg.
      Returns:
      the arg.