Search in sources :

Example 1 with BundleFileWrapper

use of org.eclipse.osgi.storage.bundlefile.BundleFileWrapper in project rt.equinox.framework by eclipse.

the class Storage method wrapBundleFile.

public BundleFile wrapBundleFile(BundleFile bundleFile, Generation generation, boolean isBase) {
    // try creating a wrapper bundlefile out of it.
    List<BundleFileWrapperFactoryHook> wrapperFactories = getConfiguration().getHookRegistry().getBundleFileWrapperFactoryHooks();
    BundleFileWrapperChain wrapped = wrapperFactories.isEmpty() ? null : new BundleFileWrapperChain(bundleFile, null);
    for (BundleFileWrapperFactoryHook wrapperFactory : wrapperFactories) {
        BundleFileWrapper wrapperBundle = wrapperFactory.wrapBundleFile(bundleFile, generation, isBase);
        if (wrapperBundle != null && wrapperBundle != bundleFile)
            bundleFile = wrapped = new BundleFileWrapperChain(wrapperBundle, wrapped);
    }
    return bundleFile;
}
Also used : BundleFileWrapperChain(org.eclipse.osgi.storage.bundlefile.BundleFileWrapperChain) BundleFileWrapperFactoryHook(org.eclipse.osgi.internal.hookregistry.BundleFileWrapperFactoryHook) BundleFileWrapper(org.eclipse.osgi.storage.bundlefile.BundleFileWrapper)

Aggregations

BundleFileWrapperFactoryHook (org.eclipse.osgi.internal.hookregistry.BundleFileWrapperFactoryHook)1 BundleFileWrapper (org.eclipse.osgi.storage.bundlefile.BundleFileWrapper)1 BundleFileWrapperChain (org.eclipse.osgi.storage.bundlefile.BundleFileWrapperChain)1