Package org.codehaus.groovy.runtime.callsite

Examples of org.codehaus.groovy.runtime.callsite.CallSite.call()


* @author Kohsuke Kawaguchi
*/
public class DefaultInvoker implements Invoker {
    public Object methodCall(Object receiver, String method, Object[] args) throws Throwable {
        CallSite callSite = fakeCallSite(method);
        Object v = callSite.call(receiver,args);
        return v;
    }

    public Object constructorCall(Class lhs, Object[] args) throws Throwable {
        Object v = fakeCallSite("<init>").callConstructor(lhs,args);
View Full Code Here


     * Evaluates a function (possibly a workflow function), then pass the result to the given continuation.
     */
    protected Next methodCall(Env e, SourceLocation loc, Continuation k, Object receiver, String methodName, Object... args) {
        try {
            CallSite callSite = fakeCallSite(methodName);
            Object v = callSite.call(receiver,args);
            // if this was a normal function, the method had just executed synchronously
            return k.receive(v);
        } catch (CpsCallableInvocation inv) {
            return inv.invoke(e, loc, k);
        } catch (Throwable t) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.