Annotation Type Export
-
@Documented @Retention(CLASS) @Target(PACKAGE) public @interface Export
Mark a package to be exported from its bundle.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.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element 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.
-
-
-
Element Detail
-
uses
java.lang.String[] uses
A list of package names that are used by this package.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.- Default:
- {}
-
-
-
attribute
java.lang.String[] attribute
A list of attribute or directive names and values.Each string should be specified in the form:
"name=value"
for attributes."name:type=value"
for typed attributes."name:=value"
for directives.
- Default:
- {}
-
-
-
substitution
Export.Substitution substitution
Specify the policy for substitutably importing this package.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.- Default:
- org.osgi.annotation.bundle.Export.Substitution.CALCULATED
-
-