Interface RuntimeCallable

All Known Implementing Classes:
RuntimeFunctionLiteral
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RuntimeCallable
Runtime contract for LPC callable values.

JVMud uses this interface for values produced by LPC closure syntax such as (: ... :) and typed function literals. Implementations may capture generated object state and locals; efuns that consume callbacks should depend on this interface rather than on a particular closure syntax.

  • Method Summary

    Modifier and Type
    Method
    Description
    call(RuntimeContext runtime, Object... args)
    Invokes the callable in an LPC runtime context.
  • Method Details

    • call

      Object call(RuntimeContext runtime, Object... args)
      Invokes the callable in an LPC runtime context.
      Parameters:
      runtime - active runtime context for callbacks that need object/session state
      args - LPC callback arguments
      Returns:
      callback result as a JVMud runtime value