Package org.eclipse.osgi.internal.loader

Examples of org.eclipse.osgi.internal.loader.BundleLoader


    public BaseClassLoader createClassLoader(ClassLoader parent,
                                             ClassLoaderDelegate delegate,
                                             BundleProtectionDomain domain,
                                             BaseData data,
                                             String[] classpath) {
        BundleLoader loader = (BundleLoader) delegate;
        AbstractBundle bundle = loader.getBundle();
        String packages = dynamicPackages.get(bundle.getBundleId());
        if (packages != null) {
            try {
                loader.addDynamicImportPackage(ManifestElement.parseHeader(Constants.DYNAMICIMPORT_PACKAGE, packages));
            } catch (BundleException e) {
                throw new RuntimeException(e);
            }
        }
       
View Full Code Here


    // validate the composite manifest
    CompositeHelper.validateCompositeManifest(compositeManifest);
    if (isResolved()) {
      // force the class loader creation before updating the surrogate to cache the current state
      // this is to allow for lazy updates of composite bundles
      BundleLoader loader = getBundleLoader();
      if (loader != null)
        loader.createClassLoader();
    }
    try {
      Map frameworkConfig = getFrameworkConfig();
      // first update the parent companion and disable it
      updateSurrogate(getBundleData(), null, null);
View Full Code Here

    public BaseClassLoader createClassLoader(ClassLoader parent,
                                             ClassLoaderDelegate delegate,
                                             BundleProtectionDomain domain,
                                             BaseData data,
                                             String[] classpath) {
        BundleLoader loader = (BundleLoader) delegate;
        AbstractBundle bundle = loader.getBundle();
        String packages = dynamicPackages.get(bundle.getBundleId());
        if (packages != null) {
            try {
                loader.addDynamicImportPackage(ManifestElement.parseHeader(Constants.DYNAMICIMPORT_PACKAGE, packages));
            } catch (BundleException e) {
                throw new RuntimeException(e);
            }
        }
       
View Full Code Here

  public BaseClassLoader createClassLoader(ClassLoader parent,
      ClassLoaderDelegate delegate, BundleProtectionDomain domain,
      BaseData data, String[] bundleclasspath) {
    if (analyzer.shouldInstrumentClassesInBundle(data.getSymbolicName())) {
      BundleLoader loader = (BundleLoader) delegate;
      try {
        loader.addDynamicImportPackage(ManifestElement.parseHeader(
            Constants.DYNAMICIMPORT_PACKAGE, analyzer
                .getRuntimePackages()));
      } catch (BundleException be) {
        throw new RuntimeException(be);
      }
View Full Code Here

  public ClassLoader getClassLoader(Bundle b)
  {
    BundleHost host = (BundleHost) b;
    BundleLoaderProxy lp = host.getLoaderProxy();
    BundleLoader bl = (lp == null) ? null : lp.getBasicBundleLoader();
    BundleClassLoader cl = (bl == null) ? null : bl.createClassLoader();
   
    return ((cl instanceof ClassLoader) ? (ClassLoader)cl : null);
  }
View Full Code Here

public class EquinoxWorker extends DefaultWorker implements FrameworkUtilWorker {

    public ClassLoader getClassLoader(Bundle b) {
        BundleHost host = (BundleHost) b;
        BundleLoaderProxy lp = host.getLoaderProxy();
        BundleLoader bl = (lp == null) ? null : lp.getBasicBundleLoader();
        BundleClassLoader cl = (bl == null) ? null : bl.createClassLoader();

        return ((cl instanceof ClassLoader) ? (ClassLoader) cl : null);
    }
View Full Code Here

  public BaseClassLoader createClassLoader(ClassLoader parent,
      ClassLoaderDelegate delegate, BundleProtectionDomain domain,
      BaseData data, String[] bundleclasspath) {
    if (analyzer.shouldInstrumentClassesInBundle(data.getSymbolicName())) {
      BundleLoader loader = (BundleLoader) delegate;
      try {
        loader.addDynamicImportPackage(ManifestElement.parseHeader(
            Constants.DYNAMICIMPORT_PACKAGE, analyzer
                .getRuntimePackages()));
      } catch (BundleException be) {
        throw new RuntimeException(be);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.internal.loader.BundleLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.