Package org.osgi.annotation.bundle
Annotation Type Attribute
- 
@Documented @Retention(CLASS) @Target(METHOD) public @interface AttributeMark an annotation element as an attribute.This is used when applying
CapabilityorRequirementas a meta annotation to an annotation declaration. The value of the annotation element annotated withAttributeis used as the value of an attribute in the generated capability or requirement clause. For example:@Capability(namespace = "my.namespace") public @interface MyCapability { @Attribute("attr") String value() default ""; } @MyCapability("foo") public MyClass {}The use of theMyCapabilityannotation, which is meta annotated with theCapabilityandAttributeannotations, will result in a capability in the namespacemy.namespacewith the attributeattr=foo.If the element annotated with
Attributeis unspecified when applied, then the attribute must not be generated in the generated capability or requirement clause. For example:@MyCapability public MyClass {}will not have theattrattribute 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 attribute. 
 -