package net.sf.lab3f.groovy; import java.io.File; import java.io.InputStream; import groovy.lang.GroovyShell; public class Main implements Groovyable{ private GroovyShell shell; public void start() throws Exception { shell = new GroovyShell(); System.out.println("[INFO] Groovy is started."); } public Object eval(InputStream is)throws Exception { return shell.evaluate(is); } public Object eval(File f)throws Exception { return shell.evaluate(f); } public Object eval(String script)throws Exception { return shell.evaluate(script); } }