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 Details

    • FeatureAnnotations

      public FeatureAnnotations()
  • Method Details

    • getLabel

      public static String getLabel(Feature feature)
    • 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. Returns null if no attribute was found.