Package aQute.bnd.annotation.headers
Annotation Type ProvideCapability
-
@Retention(CLASS) @Target({ANNOTATION_TYPE,TYPE}) public @interface ProvideCapability
Define a Provide Capability clause in the manifest.Since this annotation can only be applied once, it is possible to create an annotation that models a specific capability. For example:
interface Webserver { @ProvideCapability(ns = "osgi.extender", name = "aQute.webserver", version = "${@version}") @interface Provide {} @RequireCapability(ns = "osgi.extender", filter = "(&(osgi.extender=aQute.webserver)${frange;${@version}})") @interface Require {} } @Webserver.Provide public class MyWebserver {}
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
ns
The capability namespace.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
effective
Effective time.java.lang.String[]
mandatory
Mandatory attributes.java.lang.String
name
The name of the capability.java.lang.String[]
uses
The uses directive lists package names that are used by this Capability.java.lang.String
value
Appended at the end of the clause (after a ';').java.lang.String
version
The version of the capability.
-
-
-
-
name
java.lang.String name
The name of the capability. If this is set, a property will be added as {ns}={name}. This is the custom pattern for OSGi namespaces. Leaving this unfilled, requires thevalue()
to be used to specify the name of the capability, if needed. For exampleaQute.sse
.- Default:
- ""
-
-
-
effective
java.lang.String effective
Effective time. Specifies the time a capability is available, either resolve (default) or another name. The OSGi framework resolver only considers Capabilities without an effective directive or effective:=resolve. Capabilities with other values for the effective directive can be considered by an external agent.- Default:
- "resolve"
-
-