Annotation Type Requirement
- 
@Documented @Retention(CLASS) @Target({TYPE,PACKAGE}) @Repeatable(Requirements.class) public @interface RequirementDefine a requirement for a bundle.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.
 
- 
- 
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringnamespaceThe namespace of this requirement. 
- 
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]attributeA list of attribute or directive names and values.Requirement.CardinalitycardinalityThe cardinality of this requirement.java.lang.StringeffectiveThe effective time of this requirement.java.lang.StringfilterThe filter expression of this requirement, if any.java.lang.StringnameThe name of this requirement within the namespace.Requirement.ResolutionresolutionThe resolution policy of this requirement.java.lang.StringversionThe floor version of the version range for this requirement. 
 - 
 
- 
- 
- 
name
java.lang.String name
The name of this requirement within the namespace.If specified, adds an expression, using the
&operator with any specifiedfilter(), to the requirement's filter directive to test that an attribute with the name of the namespace is equal to the value of the specified name.- Default:
 - ""
 
 
 - 
 
- 
- 
version
java.lang.String version
The floor version of the version range for this requirement.If specified, adds a version range expression, using the
&operator with any specifiedfilter(), to the requirement's filter directive. The ceiling version of the version range is the next major version from the floor version. For example, if the specified version is1.3, then the version range expression is(&(version>=1.3)(!(version>=2.0))).The specified version must be a valid OSGi version string.
- Default:
 - ""
 
 
 - 
 
- 
- 
effective
java.lang.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
effectivedirective is omitted from the requirement clause.- Default:
 - "resolve"
 
 
 - 
 
- 
- 
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:
 - {}
 
 
 - 
 
- 
- 
cardinality
Requirement.Cardinality cardinality
The cardinality of this requirement.Indicates if this requirement can be wired a single time or multiple times.
If not specified, the
cardinalitydirective is omitted from the requirement clause.- Default:
 - org.osgi.annotation.bundle.Requirement.Cardinality.SINGLE
 
 
 - 
 
- 
- 
resolution
Requirement.Resolution 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
resolutiondirective is omitted from the requirement clause.- Default:
 - org.osgi.annotation.bundle.Requirement.Resolution.MANDATORY
 
 
 - 
 
 -