use of aQute.bnd.annotation.headers.ProvideCapability in project bnd by bndtools.
the class AnnotationHeaders method doProvideCapability.
/*
* Provide-Capability header
*/
private void doProvideCapability(Annotation a) throws Exception {
ProvideCapability annotation = a.getAnnotation(ProvideCapability.class);
Parameters p = new Parameters();
Attrs attrs = getAttributes(a, "ns");
directivesAndVersion(attrs, "uses", "mandatory", "effective");
p.put(annotation.ns(), attrs);
String value = attrs.remove("name");
if (value != null)
attrs.put(annotation.ns(), value);
value = attrs.remove("value");
String s = p.toString();
if (value != null)
s += ";" + annotation.value();
add(Constants.PROVIDE_CAPABILITY, s);
}
Aggregations