Package groovy.lang

Examples of groovy.lang.Script.evaluate()


        GroovyShell shell = cl != null ? new GroovyShell(cl) : new GroovyShell();

        // need to re-parse script due thread-safe with binding
        Script script = shell.parse(text);
        configure(exchange, script.getBinding());
        Object value = script.evaluate(text);

        return exchange.getContext().getTypeConverter().convertTo(type, value);
    }

    private void configure(Exchange exchange, final Binding binding) {
View Full Code Here


        GroovyShell shell = cl != null ? new GroovyShell(cl) : new GroovyShell();

        // need to re-parse script due thread-safe with binding
        Script script = shell.parse(text);
        configure(exchange, script.getBinding());
        Object value = script.evaluate(text);

        return exchange.getContext().getTypeConverter().convertTo(type, value);
    }

    private void configure(Exchange exchange, final Binding binding) {
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.