public class RuntimeCallInitialiser extends Object implements CallInitialiser
This class serves as a bridge between call executors defined in the package
net.sandius.rembulan.exec
and the runtime implementation.
Modifier and Type | Method and Description |
---|---|
static RuntimeCallInitialiser |
forState(StateContext stateContext)
Returns a new call initialiser for calls executed in the specified state
context
stateContext , and using the default return buffer factory
(see ReturnBuffers.defaultFactory() ). |
static RuntimeCallInitialiser |
forState(StateContext stateContext,
ReturnBufferFactory returnBufferFactory)
Returns a new call initialiser for calls executed in the specified state
context
stateContext that use return buffers initialised by the specified
factory returnBufferFactory . |
Continuation |
newCall(Object fn,
Object... args)
Returns the Lua call
fn(args...) reified as a continuation. |
public static RuntimeCallInitialiser forState(StateContext stateContext, ReturnBufferFactory returnBufferFactory)
stateContext
that use return buffers initialised by the specified
factory returnBufferFactory
.stateContext
- the state context, must not be null
returnBufferFactory
- the return buffer factory, must not be null
stateContext
NullPointerException
- if stateContext
or returnBufferFactory
is null
public static RuntimeCallInitialiser forState(StateContext stateContext)
stateContext
, and using the default return buffer factory
(see ReturnBuffers.defaultFactory()
).stateContext
- the state context, must not be null
stateContext
NullPointerException
- if stateContext
is null
public Continuation newCall(Object fn, Object... args)
CallInitialiser
fn(args...)
reified as a continuation.newCall
in interface CallInitialiser
fn
- the call target, may be null
args
- call arguments, must not be null
fn(args...)
Copyright © 2016. All rights reserved.