@Test public void testSimpleCode() throws Exception { assertEquals(1, evaluator.eval("1").result); }
public EvalEntry eval(String stmt) throws Exception { try { return (EvalEntry) latteEngine.eval(stmt, latteEngine.getBindings(ScriptContext.ENGINE_SCOPE), new Config() .setScannerType(scannerType).setVarNamePrefix(varNameBase).setEval(true)); } catch (ScriptException e) { throw (Exception) e.getCause(); } }
Evaluator { public EvalEntry eval(String stmt) throws Exception { try { return (EvalEntry) latteEngine.eval(stmt, latteEngine.getBindings(ScriptContext.ENGINE_SCOPE), new Config() .setScannerType(scannerType).setVarNamePrefix(varNameBase).setEval(true)); } catch (ScriptException e) { throw (Exception) e.getCause(); } } }
Evaluator { public EvalEntry eval(String stmt) throws Exception { try { return (EvalEntry) latteEngine.eval(stmt, latteEngine.getBindings(ScriptContext.ENGINE_SCOPE), new Config() .setScannerType(scannerType).setVarNamePrefix(varNameBase).setEval(true)); } catch (ScriptException e) { throw (Exception) e.getCause(); } } Evaluator(ClassPathLoader classPathLoader);  Evaluator(String varNameBase, ClassPathLoader classPathLoader); }
Evaluator { public EvalEntry eval(String stmt) throws Exception { try { return (EvalEntry) latteEngine.eval(stmt, latteEngine.getBindings(ScriptContext.ENGINE_SCOPE), new Config() .setScannerType(scannerType).setVarNamePrefix(varNameBase).setEval(true)); } catch (ScriptException e) { throw (Exception) e.getCause(); } } Evaluator(ClassPathLoader classPathLoader);  Evaluator(String varNameBase, ClassPathLoader classPathLoader); void setScannerType(int type); void put(String name, Object var); EvalEntry eval(String stmt); }
Evaluator { public EvalEntry eval(String stmt) throws Exception { try { return (EvalEntry) latteEngine.eval(stmt, latteEngine.getBindings(ScriptContext.ENGINE_SCOPE), new Config() .setScannerType(scannerType).setVarNamePrefix(varNameBase).setEval(true)); } catch (ScriptException e) { throw (Exception) e.getCause(); } } Evaluator(ClassPathLoader classPathLoader);  Evaluator(String varNameBase, ClassPathLoader classPathLoader); void setScannerType(int type); void put(String name, Object var); EvalEntry eval(String stmt);  }