Class DependencyComputer


  • @Component(role=DependencyComputer.class)
    public class DependencyComputer
    extends Object
    Helper class that computes compile dependencies of a bundle project. Code below is copy&paste of org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer adopted to work outside of Eclipse runtime. Note that some functionality, namely SecondaryDependencies, ExtraClasspathEntries and isPatchFragment, has been removed due to time constraints.
    • Constructor Detail

      • DependencyComputer

        public DependencyComputer()
    • Method Detail

      • computeDependencies

        public List<DependencyComputer.DependencyEntry> computeDependencies​(org.eclipse.osgi.service.resolver.StateHelper helper,
                                                                            org.eclipse.osgi.service.resolver.BundleDescription desc)
      • computeBootClasspathExtraAccessRules

        public List<ClasspathEntry.AccessRule> computeBootClasspathExtraAccessRules​(org.eclipse.osgi.service.resolver.StateHelper helper,
                                                                                    org.eclipse.osgi.service.resolver.BundleDescription desc)
        Although totally not obvious from the specification text, section 3.15 "Extension Bundles" of OSGi Core Spec apparently says that framework extension bundles can export additional packaged of the underlying JRE. More specific explanation is provided in [1] and I verified that at least Equinox 3.7.1 does indeed behave like described.

        There does not seem to be a way to tell which packages exported by a framework extension bundle are supposed to come from JRE and which from the bundle itself, so returned classpath access rules include all packages exported by the framework extension bundles. [1] http://blog.meschberger.ch/2008/10/osgi-bundles-require-classes-from.html