Search in sources :

Example 1 with ClassLoaderHolder

use of ceylon.modules.spi.runtime.ClassLoaderHolder in project ceylon by eclipse.

the class AbstractRuntime method execute.

public void execute(Configuration conf) throws Exception {
    String exe = conf.module;
    // FIXME: argument checks could be done earlier
    if (exe == null) {
        throw new CeylonRuntimeException("No initial module defined");
    }
    int p = exe.indexOf("/");
    if (p == 0) {
        throw new CeylonRuntimeException("Missing runnable info: " + exe);
    }
    if (p == exe.length() - 1) {
        throw new CeylonRuntimeException("Missing version info: " + exe);
    }
    String name = exe.substring(0, p > 0 ? p : exe.length());
    String mv = (p > 0 ? exe.substring(p + 1) : null);
    final ClassLoaderHolder clh = createClassLoader(name, mv, conf);
    execute(conf, name, clh);
}
Also used : CeylonRuntimeException(ceylon.modules.CeylonRuntimeException) ClassLoaderHolder(ceylon.modules.spi.runtime.ClassLoaderHolder)

Aggregations

CeylonRuntimeException (ceylon.modules.CeylonRuntimeException)1 ClassLoaderHolder (ceylon.modules.spi.runtime.ClassLoaderHolder)1