Module io.ebean.api
Package io.ebean.util

Class AnnotationUtil


public final class AnnotationUtil extends Object
Annotation utility methods to find annotations.
  • Constructor Details

    • AnnotationUtil

      public AnnotationUtil()
  • Method Details

    • notJavaLang

      public static boolean notJavaLang(Annotation annotation)
      Determine if the supplied Annotation is defined in the core JDK java.lang.annotation package.
    • get

      public static <A extends Annotation> A get(AnnotatedElement element, Class<A> annotation)
      Simple get on field or method with no meta-annotations or platform filtering.
    • has

      public static <A extends Annotation> boolean has(AnnotatedElement element, Class<A> annotation)
      Simple has with no meta-annotations or platform filtering.
    • typeGet

      public static <A extends Annotation> A typeGet(Class<?> clazz, Class<A> annotationType)
      On class get the annotation - includes inheritance.
    • typeGetAll

      public static <A extends Annotation> Set<A> typeGetAll(Class<?> clazz, Class<A> annotationType)
      On class get all the annotations - includes inheritance.
    • typeHas

      public static <A extends Annotation> boolean typeHas(Class<?> clazz, Class<A> annotation)
      On class simple check for annotation - includes inheritance.
    • metaHas

      public static boolean metaHas(AnnotatedElement element, Class<?> annotationType)
      Check if an element is annotated with an annotation of given type searching meta-annotations.
    • metaFindAll

      public static Set<Annotation> metaFindAll(AnnotatedElement element, Class<?> annotationType)
      Find all the annotations of a given type searching meta-annotations.
    • metaFindAllFor

      public static Set<Annotation> metaFindAllFor(AnnotatedElement element, Set<Class<?>> filter)
      Find all the annotations for the filter searching meta-annotations.