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(ThrowingFunction1).

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

See org.kink_lang.kink.hostfun for usage.

  • Method Details

    • getRecv

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

      int getArgCount()
      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.
    • getArg

      Val getArg(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 getArgCount().

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