Class AnnotationUtil


  • public class AnnotationUtil
    extends java.lang.Object
    taken from: https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/annotation/AnnotationUtils.html
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AnnotationUtil.AnnonResponse<A extends java.lang.annotation.Annotation>  
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationUtil()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <A extends java.lang.annotation.Annotation>
      java.util.Optional<A>
      findAnnotation​(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.Class<A> annotationType)
      Find a single Annotation of annotationType on the supplied AnnotatedElement.
      <A extends java.lang.annotation.Annotation>
      java.util.Optional<AnnotationUtil.AnnonResponse<A>>
      findAnnotationAndDeclaration​(java.lang.reflect.AnnotatedElement annotatedElement, java.lang.Class<A> annotationType)  
      boolean isInJavaLangAnnotationPackage​(java.lang.String annotationType)  
      • Methods inherited from class java.lang.Object

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

      • AnnotationUtil

        public AnnotationUtil()
    • Method Detail

      • findAnnotationAndDeclaration

        public <A extends java.lang.annotation.Annotation> java.util.Optional<AnnotationUtil.AnnonResponse<A>> findAnnotationAndDeclaration​(java.lang.reflect.AnnotatedElement annotatedElement,
                                                                                                                                            java.lang.Class<A> annotationType)
      • findAnnotation

        public <A extends java.lang.annotation.Annotation> java.util.Optional<A> findAnnotation​(java.lang.reflect.AnnotatedElement annotatedElement,
                                                                                                java.lang.Class<A> annotationType)
        Find a single Annotation of annotationType on the supplied AnnotatedElement. Meta-annotations will be searched if the annotation is not directly present on the supplied element.
      • isInJavaLangAnnotationPackage

        public boolean isInJavaLangAnnotationPackage​(java.lang.String annotationType)