Package org.osgi.annotation.bundle
Annotation Type Directive
- 
@Documented @Retention(CLASS) @Target(METHOD) public @interface DirectiveMark an annotation element as a directive.This is used when applying
CapabilityorRequirementas a meta annotation to an annotation declaration. The value of the annotation element annotated withDirectiveis used as the value of a directive in the generated capability or requirement clause. For example:@Capability(namespace = "my.namespace") public @interface MyCapability { @Directive("resource") String value() default ""; } @MyCapability("foo") public MyClass {}The use of theMyCapabilityannotation, which is meta annotated with theCapabilityandDirectiveannotations, will result in a capability in the namespacemy.namespacewith the directiveresource:=foo.If the element annotated with
Directiveis unspecified when applied, then the directive must not be generated in the generated capability or requirement clause. For example:@MyCapability public MyClass {}will not have theresourcedirective in the generated capability.This annotation is not retained at runtime. It is for use by tools to generate bundle manifests.
 
- 
- 
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringvalueThe name of the directive. 
 -