public class CpsCallableInvocation extends Error
The instance captures everything necessary to invoke a function, which is the definition of the function, object that the function is invoked on, and actual arguments to the function. When we invoke CPS-transformed closure or function, this throwable gets thrown.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CpsCallableInvocation.MismatchHandler |
| Modifier and Type | Field and Description |
|---|---|
List |
arguments |
CpsCallable |
call |
String |
methodName |
Object |
receiver |
| Constructor and Description |
|---|
CpsCallableInvocation(CpsCallable call,
Object receiver,
Object... arguments)
Deprecated.
|
CpsCallableInvocation(String methodName,
CpsCallable call,
Object receiver,
Object... arguments) |
| Modifier and Type | Method and Description |
|---|---|
Block |
asBlock()
Creates a
Block that performs this invocation and pass the result to the given Continuation. |
Throwable |
fillInStackTrace() |
Next |
invoke(Env caller,
SourceLocation loc,
Continuation k) |
static void |
registerMismatchHandler(CpsCallableInvocation.MismatchHandler handler) |
String |
toString() |
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic final String methodName
public final CpsCallable call
public final Object receiver
public final List arguments
@Deprecated public CpsCallableInvocation(CpsCallable call, Object receiver, Object... arguments)
public CpsCallableInvocation(String methodName, CpsCallable call, Object receiver, Object... arguments)
methodName - see checkMismatch(java.lang.Object, java.util.List<java.lang.String>)public Next invoke(Env caller, SourceLocation loc, Continuation k)
public static void registerMismatchHandler(@CheckForNull CpsCallableInvocation.MismatchHandler handler)
public Block asBlock()
Block that performs this invocation and pass the result to the given Continuation.public Throwable fillInStackTrace()
fillInStackTrace in class ThrowableCopyright © 2011–2019. All rights reserved.