use of org.eclipse.osgi.container.ModuleWiring in project rt.equinox.framework by eclipse.
the class RegisteredPolicy method loadClass.
public Class<?> loadClass(String name) {
if (allDependents == null)
return null;
Class<?> result = null;
int size = allDependents.size();
for (int i = 0; i < size && result == null; i++) {
ModuleWiring searchWiring = allDependents.get(i);
BundleLoader searchLoader = (BundleLoader) searchWiring.getModuleLoader();
if (searchLoader != null) {
try {
result = searchLoader.findClass(name);
} catch (ClassNotFoundException e) {
// Nothing to do, just keep looking
continue;
}
}
}
return result;
}
use of org.eclipse.osgi.container.ModuleWiring in project rt.equinox.framework by eclipse.
the class RegisteredPolicy method loadResource.
public URL loadResource(String name) {
if (allDependents == null)
return null;
URL result = null;
int size = allDependents.size();
for (int i = 0; i < size && result == null; i++) {
ModuleWiring searchWiring = allDependents.get(i);
BundleLoader searchLoader = (BundleLoader) searchWiring.getModuleLoader();
if (searchLoader != null) {
result = searchLoader.findResource(name);
}
}
return result;
}
use of org.eclipse.osgi.container.ModuleWiring in project rt.equinox.framework by eclipse.
the class PackageSource method getBundleLoader.
private static BundleLoader getBundleLoader(Bundle bundle) {
ModuleRevision producer = ((EquinoxBundle) bundle).getModule().getCurrentRevision();
ModuleWiring producerWiring = producer.getWiring();
return producerWiring == null ? null : (BundleLoader) producerWiring.getModuleLoader();
}
use of org.eclipse.osgi.container.ModuleWiring in project rt.equinox.framework by eclipse.
the class DependentPolicy method loadResources.
public Enumeration<URL> loadResources(String name) {
if (allDependents == null)
return null;
Enumeration<URL> results = null;
// size may change, so we must check it every time
for (int i = 0; i < allDependents.size(); i++) {
ModuleWiring searchWiring = allDependents.get(i);
BundleLoader searchLoader = (BundleLoader) searchWiring.getModuleLoader();
if (searchLoader != null) {
try {
results = BundleLoader.compoundEnumerations(results, searchLoader.findResources(name));
addDependent(i, searchWiring);
} catch (IOException e) {
// Ignore and keep looking
}
}
}
return results;
}
Aggregations