Top Description Methods
aQute.bnd.annotation.headers

public @Interface ProvideCapability

extends Annotation
Annotations
@Deprecated
@Retention:CLASS
@Target:ANNOTATION_TYPE, TYPE
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Deprecated

see org.osgi.annotation.bundle.Capability

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 {}

Method Summary

Modifier and TypeMethod and Description
public String
effective()

Effective time.

public String[]
mandatory()

Mandatory attributes.

public String
name()

The name of the capability.

public String
ns()

The capability namespace.

public String[]
uses()

The uses directive lists package names that are used by this Capability.

public String
value()

Appended at the end of the clause (after a ';').

public String
version()

The version of the capability.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

effectiveback to summary
public 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.

mandatoryback to summary
public String[] mandatory()

Mandatory attributes. Forces the resolver to only satisfy filters that refer to all listed attributes.

nameback to summary
public 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 the value() to be used to specify the name of the capability, if needed. For example aQute.sse.

nsback to summary
public String ns()

The capability namespace. For example: osgi.contract.

usesback to summary
public String[] uses()

The uses directive lists package names that are used by this Capability. This information is intended to be used for uses constraints,

valueback to summary
public String value()

Appended at the end of the clause (after a ';'). Can be used to add additional attributes and directives.

versionback to summary
public String version()

The version of the capability. This must be a valid OSGi version.