Package com.cloudbees.groovy.cps

Examples of com.cloudbees.groovy.cps.Next


    public ThrowBlock(Block exp) {
        this.exp = exp;
    }

    public Next eval(final Env e, Continuation _) {
        return new Next(exp,e,new Continuation() {
            public Next receive(Object t) {
                if (t==null) {
                    t = new NullPointerException();
                }
                if (!(t instanceof Throwable)) {
View Full Code Here


    /**
     * Creates a brand-new thread that evaluates 'b'.
     */
    GreenThreadState(GreenThread g, Block b) {
        // TODO: allow the caller to pass a value
        this(g,new Next(b, new FunctionCallEnv(null, null, null, HALT), HALT));
    }
View Full Code Here

    /**
     * Creates a {@link GreenThreadState} that's already dead.
     */
    GreenThreadState(GreenThread g, Outcome v) {
        this(g,new Next(null,HALT,v));
    }
View Full Code Here

        public Next body(Object _) {
            if (index==cases.size()) {
                // that was the last block
                return k.receive(null);
            } else {
                Next n = then(getCase().body, caseEnv, body);
                index++;
                return n;
            }
        }
View Full Code Here

        assignArguments(args, e);

        // TODO: who handles 'it' ?

        return new Next(body, e, k);
    }
View Full Code Here

TOP

Related Classes of com.cloudbees.groovy.cps.Next

Copyright © 2018 www.massapicom. 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.