Package com.cloudbees.groovy.cps.impl
Class CpsCallableInvocation
java.lang.Object
java.lang.Throwable
java.lang.Error
com.cloudbees.groovy.cps.impl.CpsCallableInvocation
- All Implemented Interfaces:
Serializable
When an CPS-interpreted method is invoked, it immediately throws this error
to signal that the method execution needs to be interpreted.
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.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCpsCallableInvocation(CpsCallable call, Object receiver, Object... arguments) Deprecated.CpsCallableInvocation(String methodName, CpsCallable call, Object receiver, Object... arguments) -
Method Summary
Modifier and TypeMethodDescriptionasBlock()Creates aBlockthat performs this invocation and pass the result to the givenContinuation.invoke(Env caller, SourceLocation loc, Continuation k) static voidtoString()Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
methodName
-
call
-
receiver
-
arguments
-
-
Constructor Details
-
CpsCallableInvocation
Deprecated. -
CpsCallableInvocation
public CpsCallableInvocation(String methodName, CpsCallable call, Object receiver, Object... arguments) - Parameters:
methodName- seecheckMismatch(java.lang.Object, java.util.List<java.lang.String>)
-
-
Method Details
-
invoke
-
registerMismatchHandler
public static void registerMismatchHandler(@CheckForNull CpsCallableInvocation.MismatchHandler handler) - See Also:
-
checkMismatch(java.lang.Object, java.util.List<java.lang.String>)
-
asBlock
Creates aBlockthat performs this invocation and pass the result to the givenContinuation. -
fillInStackTrace
- Overrides:
fillInStackTracein classThrowable
-
toString
-