@Test public void testRegister() { TestScriptRunner testScriptRunner = new TestScriptRunner(); scriptHandler.register(testScriptRunner); ScriptRunner actual = scriptHandler.get(ScriptFragment.of("fortest")); assertEquals(testScriptRunner, actual); assertNull(scriptHandler.get(ScriptFragment.of("nothing"))); }
@Override public void register(ScriptRunnerModule scriptRunnerModule) { Iterator<ScriptRunner> elements = scriptRunnerModule.getScriptRunners().iterator(); while (elements.hasNext()) { register(elements.next()); } }
DefaultScriptHandler implements ScriptHandler { @Override public void register(ScriptRunnerModule scriptRunnerModule) { Iterator<ScriptRunner> elements = scriptRunnerModule.getScriptRunners().iterator(); while (elements.hasNext()) { register(elements.next()); } } }
DefaultScriptHandler implements ScriptHandler { @Override public void register(ScriptRunnerModule scriptRunnerModule) { Iterator<ScriptRunner> elements = scriptRunnerModule.getScriptRunners().iterator(); while (elements.hasNext()) { register(elements.next()); } } DefaultScriptHandler(); }
DefaultScriptHandler implements ScriptHandler { @Override public void register(ScriptRunnerModule scriptRunnerModule) { Iterator<ScriptRunner> elements = scriptRunnerModule.getScriptRunners().iterator(); while (elements.hasNext()) { register(elements.next()); } } DefaultScriptHandler(); @Override Object runScript(ScriptFragment scriptFragment); @Override void register(ScriptRunnerModule scriptRunnerModule); @Override void register(ScriptRunner scriptRunner); ScriptRunner get(ScriptFragment scriptFragment); }
DefaultScriptHandler implements ScriptHandler { @Override public void register(ScriptRunnerModule scriptRunnerModule) { Iterator<ScriptRunner> elements = scriptRunnerModule.getScriptRunners().iterator(); while (elements.hasNext()) { register(elements.next()); } } DefaultScriptHandler(); @Override Object runScript(ScriptFragment scriptFragment); @Override void register(ScriptRunnerModule scriptRunnerModule); @Override void register(ScriptRunner scriptRunner); ScriptRunner get(ScriptFragment scriptFragment);  }