Analysis of groovy expression
no vote
public class ExprSupport { private static final Object lock = new Object(); private static final GroovyShell shell; private static Hashtable cache = new Hashtable(); static { CompilerConfiguration cfg = new CompilerConfiguration(); cfg.setScriptBaseClass ( MyBasicScript.class.getName ()); shell = new GroovyShell(cfg); } public static Object parseExpr(String expr) { Script s = getScriptFromCache(expr); return s.run(); } public static Object parseExpr(String