Package com.cloudbees.groovy.cps.sandbox
Interface Invoker
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultInvoker,SandboxInvoker
Abstracts away interactions with Groovy objects, for example to provide an opportunity to intercept
calls.
During the execution of CPS code, Invoker is available from Env.getInvoker().
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Env.getInvoker()Continuable(Script, Env)Envs.empty(Invoker)- "doc/sandbox.md"
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconstructorCall(Class lhs, Object[] args) contextualize(CallSiteBlock tags) Returns a childInvokerused to make a call on behalf of the givenCallSiteBlock.getAttribute(Object lhs, String name) getProperty(Object lhs, String name) methodCall(Object receiver, String method, Object[] args) methodPointer(Object lhs, String name) voidvoidsetAttribute(Object lhs, String name, Object value) voidsetProperty(Object lhs, String name, Object value) Invokespecial equivalent used for "super.foo(...)" kind of method call.
-
Field Details
-
INSTANCE
Default instance to be used.
-
-
Method Details
-
methodCall
- Throws:
Throwable
-
constructorCall
- Throws:
Throwable
-
superCall
Invokespecial equivalent used for "super.foo(...)" kind of method call.- Parameters:
senderType- The type of the current method. Resolution of 'super' depends on this. 'receiver' is an instance of this type.receiver- Instance that gets the method call- Throws:
Throwable
-
getProperty
- Throws:
Throwable
-
setProperty
- Throws:
Throwable
-
getAttribute
- Throws:
Throwable
-
setAttribute
- Throws:
Throwable
-
getArray
- Throws:
Throwable
-
setArray
- Throws:
Throwable
-
methodPointer
-
cast
Object cast(Object value, Class<?> type, boolean ignoreAutoboxing, boolean coerce, boolean strict) throws Throwable - Throws:
Throwable
-
contextualize
Returns a childInvokerused to make a call on behalf of the givenCallSiteBlock.
-