For example:
@Requirement(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 a package.
This annotation can be used to annotate an annotation.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Requirement.
Cardinality for this requirement. |
| public static class | Requirement.
Resolution for this requirement. |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String |
| attribute | back to summary |
|---|---|
| public String[] attribute() A list of attribute or directive names and values. Each string should be specified in the form:
| |
| cardinality | back to summary |
|---|---|
| public String cardinality() The cardinality of this requirement. Indicates if this requirement can be wired a single time or multiple times.
If not specified, the | |
| effective | back to summary |
|---|---|
| public String effective() The effective time of this requirement. Specifies the time the requirement is available. The OSGi framework resolver only considers requirement without an effective directive or effective:=resolve. Requirements with other values for the effective directive can be considered by an external agent.
If not specified, the | |
| filter | back to summary |
|---|---|
| public String filter() The filter expression of this requirement, if any. | |
| name | back to summary |
|---|---|
| public String name() The name of this requirement within the namespace.
If specified, adds an expression, using the | |
| namespace | back to summary |
|---|---|
| public String namespace() The namespace of this requirement. | |
| resolution | back to summary |
|---|---|
| public String resolution() The resolution policy of this requirement. A mandatory requirement forbids the bundle to resolve when this requirement is not satisfied; an optional requirement allows a bundle to resolve even if this requirement is not satisfied.
If not specified, the | |
| version | back to summary |
|---|---|
| public String version() The floor version of the version range for this requirement.
If specified, adds a version range expression, using the The specified version must be a valid OSGi version string. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | MULTIPLE
Indicates if the requirement can be wired multiple times. |
| public static final String | SINGLE
Indicates if the requirement can only be wired a single time. |
| Access | Constructor and Description |
|---|---|
| private |
| MULTIPLE | back to summary |
|---|---|
| public static final String MULTIPLE Indicates if the requirement can be wired multiple times. | |
| SINGLE | back to summary |
|---|---|
| public static final String SINGLE Indicates if the requirement can only be wired a single time. | |
| Cardinality | back to summary |
|---|---|
| private Cardinality() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | MANDATORY
A mandatory requirement forbids the bundle to resolve when the requirement is not satisfied. |
| public static final String | OPTIONAL
An optional requirement allows a bundle to resolve even if the requirement is not satisfied. |
| Access | Constructor and Description |
|---|---|
| private |
| MANDATORY | back to summary |
|---|---|
| public static final String MANDATORY A mandatory requirement forbids the bundle to resolve when the requirement is not satisfied. | |
| OPTIONAL | back to summary |
|---|---|
| public static final String OPTIONAL An optional requirement allows a bundle to resolve even if the requirement is not satisfied. | |
| Resolution | back to summary |
|---|---|
| private Resolution() | |