Steven E. Harris wrote:
"Richard S. Hall" <[EMAIL PROTECTED]> writes:
In truth, we could avoid passing this into the constructor and pass it
into the getLibraries() instead, then you wouldn't need it at all,
since you don't need to call this method for converting a bundle to a
resource.
I just made that change, and only had to correct one constructor call
and one method call elsewhere.
Admittedly, ManifestParser is still a little bit rough around the
edges for this purpose, but it definitely has the basics. It currently
has the ability to:
* Convert bundle symbolic name and package export to capabilities.
* Convert require-bundle and package import to requirements.
That's probably all I need here.
On to the next small problem: ManifestParser wants a java.util.Map as
its "header map". Bundle.getHeaders() returns a
java.util.Dictionary. I see that there's a MapToDictionary class in
Felix already. Is there some way short of writing another such class
to get from a Dictionary to a Map?
Funny, I see that BundleInfo.getCurrentLocalizedHeader(String) returns
a Map, which is converted to a Dictionary by Bundle.getHeaders().
Yep. We generally only use Map/List, but the OSGi R1 spec stuck us with
Dictionary...perhaps we could make MapToDictionary also implement Map?
-> richard