Compiles a set of java sources and loads the compiled classes in the gate class loader. @param sources a map from fully qualified classname to java source @param classLoader the classloader into which the sources should be compiled and loaded. Note that this classloader m
(Map<String, String> sources,
GateClassLoader classLoader)
| 44 | * raised. |
| 45 | */ |
| 46 | public static void loadClasses(Map<String, String> sources, |
| 47 | GateClassLoader classLoader) throws GateException { |
| 48 | |
| 49 | if(compiler == null) { |
| 50 | setCompilerTypeFromUserConfig(); |
| 51 | } |
| 52 | |
| 53 | if (classLoader == null) { |
| 54 | Err.println("A null classloader was provided, using the Top-Level GATE classloader instead!"); |
| 55 | classLoader = Gate.getClassLoader(); |
| 56 | } |
| 57 | |
| 58 | compiler.compile(sources, classLoader); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Sets the type of compiler to be used, based on the user's configuration. |
nothing calls this directly
no test coverage detected