use of org.datanucleus.plugin.Bundle in project datanucleus-core by datanucleus.
the class OSGiBundleParser method getRequireBundle.
/**
* Accessor for the Bundle-Name from the manifest.mf file
* @param mf the manifest
* @return the Set with BundleDescription
*/
private static List<Bundle.BundleDescription> getRequireBundle(Dictionary<String, String> headers) {
String str = headers.get("Require-Bundle");
if (str == null || str.length() < 1) {
return Collections.emptyList();
}
Parser p = new Parser(str);
List<Bundle.BundleDescription> requiredBundle = new ArrayList<Bundle.BundleDescription>();
String bundleSymbolicName = p.parseSymbolicName();
while (bundleSymbolicName != null) {
Bundle.BundleDescription bd = new Bundle.BundleDescription();
bd.setBundleSymbolicName(bundleSymbolicName);
bd.setParameters(p.parseParameters());
bundleSymbolicName = p.parseSymbolicName();
requiredBundle.add(bd);
}
return requiredBundle;
}
Aggregations