aQute.bnd.annotation.headers
Annotation Type RequireCapability


@Retention(value=CLASS)
@Target(value={ANNOTATION_TYPE,TYPE})
public @interface RequireCapability

The Bundle’s Require-Capability header About


Required Element Summary
 String filter
          A filter expression that is asserted on the Capabilities belonging to the given namespace.
 String ns
          The capability namespace.
 
Optional Element Summary
 String effective
          Specifies the time a Requirement is considered, either 'resolve' (default) or another name.
 Resolution resolution
          A mandatory Requirement forbids the bundle to resolve when the Requirement is not satisfied; an optional Requirement allows a bundle to resolve even if the Requirement is not satisfied.
 String value
           
 

Element Detail

ns

public abstract String ns
The capability namespace. For example: osgi.contract.


filter

public abstract String filter
A filter expression that is asserted on the Capabilities belonging to the given namespace. The matching of the filter against the Capability is done on one Capability at a time. A filter like (&(a=1)(b=2)) matches only a Capability that specifies both attributes at the required value, not two capabilties that each specify one of the attributes correctly. A filter is optional, if no filter directive is specified the Requirement always matches.

value

public abstract String value
Default:
""

effective

public abstract String effective
Specifies the time a Requirement is considered, either 'resolve' (default) or another name. The OSGi framework resolver only considers Requirements without an effective directive or effective:=resolve. Other Requirements can be considered by an external agent. Additional names for the effective directive should be registered with the OSGi Alliance. See OSGi Reference Page

Default:
"resolve"

resolution

public abstract Resolution resolution
A mandatory Requirement forbids the bundle to resolve when the Requirement is not satisfied; an optional Requirement allows a bundle to resolve even if the Requirement is not satisfied. No wirings are created when this Requirement cannot be resolved, this can result in Class Not Found Exceptions when the bundle attempts to use a package that was not resolved because it was optional.

Default:
aQute.bnd.annotation.headers.Resolution.mandatory


Copyright © 2014 aQute SARL. All rights reserved.