Package org.togglz.core.annotation
Annotation 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;
}
- Author:
- Christian Kaltepoth
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the method to call on the annotation to retrieve the value of the attribute.