@Test public void testEvaluateClass() throws Exception { @SuppressWarnings("unchecked") java.util.List<Class<?>> list = (java.util.List<Class<?>>) evaluator.eval("class User").result; assertEquals(1, list.size()); assertEquals("User", list.get(0).getName()); }
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);  }