The Eclipse-BuddyPolicy Header
The Eclipse-BuddyPolicy header is used to specify the buddy classloading policies for a bundle. The Eclipse-BuddyPolicy header must use the following syntax:
Eclipse-BuddyPolicy ::= ( policy-name ) ( ',' policy-name ) * policy-name ::= ( 'dependent' | 'global' | 'registered' | 'app' | 'ext' | 'boot' | 'parent' )
The following is an example of the Eclipse-BuddyPolicy header:
Eclipse-BuddyPolicy: dependent
The Eclipse-RegisterBuddy Header
The Eclipse-RegisterBuddy header is used to declare a comma-separated list of symbolic names of bundles that this bundle should be a registered buddy to. The bundles with the specified symbolic names must use the registered buddy policy (specified by the Eclipse-BuddyPolicy) header) in order for this bundle to be a registered buddy.
Note that the following conditions must be met before a bundle X can become a registered buddy of another bundle Y:
- The bundle Y must specify the registered buddy policy (i.e. Eclipse-BuddyPolicy: registered)
- The bundle X must specify the symbolic name of Y in the Eclipse-RegisterBuddy header (i.e Eclipse-RegisterBuddy: Y)
- The bundle X must be dependent on a package exported by bundle Y. This can happen through either a Require-Bundle or Import-Package constraint.
The syntax of the Eclipse-RegisterBuddy header is the following:
Eclipse-RegisterBuddy ::= ( target-bundle ) ( ',' target-bundle ) * target-bundle ::= a bundle symbolic name
The following is an example of the Eclipse-RegisterBuddy header:
Eclipse-RegisterBuddy: org.eclipse.foo.bundle1, org.eclipse.foo.bundle2
参考1:http://www.biologicsoftwareconsulting.com/articles/Create%20Plugin%20to%20Hold%20Third%20Party%20Library.pdf
参考2:http://www.cnblogs.com/bronte/articles/2520039.html