@Documented @Retention(value=CLASS) @Target(value={TYPE,PACKAGE}) @Repeatable(value=Capabilities.class) public @interface Capability
For example:
@Capability(namespace=ExtenderNamespace.EXTENDER_NAMESPACE, name="osgi.component", version="1.3.0")
This annotation is not retained at runtime. It is for use by tools to generate bundle manifests or otherwise process the type or package.
This annotation can be used to annotate an annotation.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
namespace
The namespace of this capability.
|
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String[] |
attribute
A list of attribute or directive names and values.
|
java.lang.String |
effective
The effective time of this capability.
|
java.lang.String |
name
The name of this capability within the namespace.
|
java.lang.Class<?>[] |
uses
A list of classes whose packages are inspected to calculate the
uses directive for this capability. |
java.lang.String |
version
The version of this capability.
|
public abstract java.lang.String namespace
public abstract java.lang.String name
If specified, adds an attribute with the name of the namespace and the value of the specified name to the capability clause.
public abstract java.lang.String version
If specified, adds an attribute with the name and type of
version:Version
and the value of the specified version to the
capability clause.
The specified version must be a valid OSGi version string.
public abstract java.lang.Class<?>[] uses
uses
directive for this capability.
If not specified, the uses
directive is omitted from the
capability clause.
public abstract java.lang.String effective
Specifies the time the capability is available. 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.
If not specified, the effective
directive is omitted from the
capability clause.
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.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0