@Retention(value=RUNTIME) @Target(value=TYPE) public @interface FeatureAttribute
Annotation used to define custom metadata attributes for features.
Let's assume you want to define a custom attribute that holds the issue identifier of your issue tracker. To do so, create an annotation like this:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@FeatureAttribute("Issue")
public @interface Issue {
String value();
}
Now you can use this new annotation on your feature enum like this:
public enum MyFeatures implements Feature {
@Label("My cool new feature")
@Issue("TOGGLZ-123")
MY_NEW_FEATURE;
}
| Modifier and Type | Required Element and Description |
|---|---|
String |
value
The name of the feature attribute.
|
| Modifier and Type | Optional Element and Description |
|---|---|
String |
annotationAttribute
The name of the method to call on the annotation to retrieve the value of the attribute.
|
Copyright © 2018. All Rights Reserved.