Reading MANIFEST.MF file from a fragment in OSGi
Is there a standard way of reading MANIFEST.MF key-value pairs from a fr开发者_运维问答agment in OSGi?
Each fragment is represented in the OSGi framework with a Bundle object. If you call BundleContext.getBundles() the returned list will include both fragment, and non fragment bundle. If you search through the array to find the fragment you are interested in you can call the Bundle.getHeaders() method which will return a Hashtable containing the name value paris.
精彩评论