Package org.togglz.core.util
Class FeatureAnnotations
- java.lang.Object
-
- org.togglz.core.util.FeatureAnnotations
-
public class FeatureAnnotations extends Object
Utility class to read annotation on feature enums.- Author:
- Christian Kaltepoth, Eli Abramovitch
-
-
Constructor Summary
Constructors Constructor Description FeatureAnnotations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A extends Annotation>
AgetAnnotation(Feature feature, Class<A> annotationType)static Set<Annotation>getAnnotations(Feature feature)static String[]getFeatureAttribute(Annotation annotation)Checks whether the supplied annotation specifies a feature attribute.static StringgetLabel(Feature feature)static booleanisAnnotationPresent(Feature feature, Class<? extends Annotation> annotationType)static booleanisEnabledByDefault(Feature feature)
-
-
-
Method Detail
-
isEnabledByDefault
public static boolean isEnabledByDefault(Feature feature)
-
isAnnotationPresent
public static boolean isAnnotationPresent(Feature feature, Class<? extends Annotation> annotationType)
-
getAnnotations
public static Set<Annotation> getAnnotations(Feature feature)
-
getAnnotation
public static <A extends Annotation> A getAnnotation(Feature feature, Class<A> annotationType)
-
getFeatureAttribute
public static String[] getFeatureAttribute(Annotation annotation)
Checks whether the supplied annotation specifies a feature attribute. If so, it returns an String array containing the name of the attribute at the first and the value at the second position. Returnsnullif no attribute was found.
-
-