Class AnnotationUtils


  • public class AnnotationUtils
    extends java.lang.Object
    Simple utility class to introspect annotations.
    Since:
    2.1
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getAnnotationPattern​(java.lang.annotation.Annotation annotation)
      Extract the pattern() from annotation.
      static java.lang.annotation.Annotation[] getAnnotationsArrayValue​(java.lang.annotation.Annotation annotation)
      Extract the Annotations array value() from annotation if present, nul otherwise.
      static java.lang.Object getAnnotationValue​(java.lang.annotation.Annotation annotation)
      Extract the value() from annotation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAnnotationValue

        public static java.lang.Object getAnnotationValue​(java.lang.annotation.Annotation annotation)
        Extract the value() from annotation.
        Parameters:
        annotation - the annotation has to be introspected.
        Returns:
        the annotation value().
      • getAnnotationPattern

        public static java.lang.String getAnnotationPattern​(java.lang.annotation.Annotation annotation)
        Extract the pattern() from annotation.
        Parameters:
        annotation - the annotation has to be introspected.
        Returns:
        the annotation pattern().
      • getAnnotationsArrayValue

        public static java.lang.annotation.Annotation[] getAnnotationsArrayValue​(java.lang.annotation.Annotation annotation)
        Extract the Annotations array value() from annotation if present, nul otherwise.
        Parameters:
        annotation - the annotation has to be introspected.
        Returns:
        the annotation value() as Annotations array.