Class AnnotationUtil

java.lang.Object
ch.kk7.confij.common.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

    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 Details

    • AnnotationUtil

      public AnnotationUtil()
  • Method Details

    • 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)