protected abstract String getMethodName(CommandState commandState, Class<?> testClass);
private ClassLoader getTestClassLoader(String testClassName) {
String currentDirectoryName = getCurrentDirectoryName(true);
RuntimeModule runtimeModule = null;
try {
if (currentDirectoryName != null && !InteractiveCommandUtils.isRootProject(currentDirectoryName)) {
runtimeModule = Impala.getRuntimeModule(currentDirectoryName);
}
else {
runtimeModule = Impala.getRootRuntimeModule();
}
}
catch (RuntimeException e) {
System.out.println("No module loaded for current directory: " + currentDirectoryName);
runtimeModule = Impala.getRootRuntimeModule();
}
ClassLoader parentClassLoader = null;
if (runtimeModule != null)
parentClassLoader = runtimeModule.getClassLoader();
else
parentClassLoader = ClassUtils.getDefaultClassLoader();
ClassLoader testClassLoader = getTestClassLoader(parentClassLoader, testClassName);
return testClassLoader;