Package org.eclipse.tycho.core.osgitools
Class DependencyComputer
- java.lang.Object
-
- org.eclipse.tycho.core.osgitools.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DependencyComputer.DependencyEntry
-
Constructor Summary
Constructors Constructor Description DependencyComputer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDependencyViaImportPackage(org.eclipse.osgi.service.resolver.BundleDescription desc, HashSet<org.eclipse.osgi.service.resolver.BundleDescription> added, Map<org.eclipse.osgi.service.resolver.BundleDescription,ArrayList<ClasspathEntry.AccessRule>> map, ArrayList<DependencyComputer.DependencyEntry> entries)
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.List<DependencyComputer.DependencyEntry>
computeDependencies(org.eclipse.osgi.service.resolver.StateHelper helper, org.eclipse.osgi.service.resolver.BundleDescription desc)
-
-
-
Method Detail
-
computeDependencies
public List<DependencyComputer.DependencyEntry> computeDependencies(org.eclipse.osgi.service.resolver.StateHelper helper, org.eclipse.osgi.service.resolver.BundleDescription desc)
-
addDependencyViaImportPackage
protected void addDependencyViaImportPackage(org.eclipse.osgi.service.resolver.BundleDescription desc, HashSet<org.eclipse.osgi.service.resolver.BundleDescription> added, Map<org.eclipse.osgi.service.resolver.BundleDescription,ArrayList<ClasspathEntry.AccessRule>> map, ArrayList<DependencyComputer.DependencyEntry> entries)
-
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
-
-