@Test public void testExternalFunction() throws Exception { ExternalFunction f = new ExternalFunction(new ConfigThingy("", "URL \"java:de.muenchen.allg.itd51.wollmux.func.ExternalFunctionTest.extMethod\"")); assertEquals(0, f.parameters().length); assertEquals("extMethod", f.invoke(new Values.None())); f = new ExternalFunction(new ConfigThingy("", "URL \"java:de.muenchen.allg.itd51.wollmux.func.ExternalFunctionTest.extMethod2\" PARAMS(\"param\")")); Values.SimpleMap values = new Values.SimpleMap(); values.put("param", "value"); assertEquals(1, f.parameters().length); assertEquals("value", f.invoke(values)); assertThrows(ConfigurationErrorException.class, () -> new ExternalFunction(new ConfigThingy("", "URL \"java:de.muenchen.allg.itd51.wollmux.func.ExternalFunctionTest.extMethod4\""))); assertThrows(ConfigurationErrorException.class, () -> new ExternalFunction( new ConfigThingy("", "URL \"java:de.muenchen.allg.itd51.wollmux.func.UnknownClass.extMethod4\""))); new ExternalFunction(new ConfigThingy("", "URL \"java:de.muenchen.allg.itd51.wollmux.func.ExternalFunctionTest.extMethod3\"")); }
public ExternalFunction(ConfigThingy conf) { this(conf, null); }
ExternalFunction { public ExternalFunction(ConfigThingy conf) { this(conf, null); } }
ExternalFunction { public ExternalFunction(ConfigThingy conf) { this(conf, null); } ExternalFunction(ConfigThingy conf);  ExternalFunction(ConfigThingy conf, ClassLoader classLoader); }
ExternalFunction { public ExternalFunction(ConfigThingy conf) { this(conf, null); } ExternalFunction(ConfigThingy conf);  ExternalFunction(ConfigThingy conf, ClassLoader classLoader); String[] parameters(); Object invoke(Values parameters); Object invoke(Object[] args); }
ExternalFunction { public ExternalFunction(ConfigThingy conf) { this(conf, null); } ExternalFunction(ConfigThingy conf);  ExternalFunction(ConfigThingy conf, ClassLoader classLoader); String[] parameters(); Object invoke(Values parameters); Object invoke(Object[] args);  }