Bundle systemBundle = injectedBundleManager.getValue().getSystemBundle();
specBuilder.setModuleClassLoaderFactory(new BundleReferenceClassLoader.Factory<Bundle>(systemBundle));
try {
final ModuleSpec moduleSpec = specBuilder.create();
ModuleLoader moduleLoader = new ModuleLoader() {
@Override
protected ModuleSpec findModule(ModuleIdentifier identifier) throws ModuleLoadException {
return (moduleSpec.getModuleIdentifier().equals(identifier) ? moduleSpec : null);
}
@Override
public String toString() {
return "FrameworkModuleLoader";