Package aQute.bnd.annotation.service
Annotation Type ServiceCapability
-
@Retention(CLASS) @Target({TYPE,PACKAGE}) @Repeatable(ServiceCapabilities.class) @Capability(namespace="osgi.service", attribute={"objectClass:List<String>=\"${uniq;${#value}}\"","uses:=\"${if;${size;${#uses}};${#uses};${uniq;${replace;${#value};(.*)\\.[^.]+;$1}}}\"","${sjoin;\\;;${#attribute}}"}) public @interface ServiceCapability
Adds a ProvideCapability for a service. This is useful to the resolver, when a service is registered manually. It can annotate a class or a package. If it annotates a class without specifying a value, the class will be named as the registered service. Uses constraints will be calculated automatically.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]
attribute
A list of attribute or directive names and values.java.lang.Class<?>[]
uses
A list of classes whose packages are inspected to calculate theuses
directive for this capability.java.lang.Class<?>
value
The service type.
-
-
-
-
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.
osgi.serviceloader
capability. Non-standardosgi.serviceloader
attributes will be included as service properties to the published service.- Default:
- {}
-
-