@Documented
@Retention(value=CLASS)
@Target(value=PACKAGE)
public @interface Export
The package must also be annotation with the Version
annotation to
specify the export version of the package.
This annotation is not retained at runtime. It is for use by tools to generate bundle manifests or otherwise process the package.
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String[] |
attribute
A list of attribute or directive names and values.
|
Export.Substitution |
substitution
Specify the policy for substitutably importing this package.
|
java.lang.String[] |
uses
A list of package names that are used by this package.
|
public abstract java.lang.String[] uses
If the uses
directive must be omitted from the export package
clause for this package, the empty value {}
must
be specified.
If not specified, the uses
directive for the export package
clause is calculated by inspection of the classes in this package.
public abstract java.lang.String[] attribute
Each string should be specified in the form:
"name=value"
for attributes."name:type=value"
for typed attributes."name:=value"
for directives.public abstract Export.Substitution substitution
Bundles that collaborate require the same class loader for types used in the collaboration. If multiple bundles export packages with collaboration types then they will have to be placed in disjoint class spaces, making collaboration impossible. Collaboration is significantly improved when bundles are willing to import exported packages; these imports will allow a framework to substitute exports for imports.
If not specified, the Export.Substitution.CALCULATED
substitution
policy is used for this package.
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0