Class AnnotationExtractor

java.lang.Object
io.github.resilience4j.utils.AnnotationExtractor

public class AnnotationExtractor extends Object
  • Method Details

    • extract

      @Nullable public static <T extends Annotation> T extract(Class<?> targetClass, Class<T> annotationClass)
      extract annotation from target class
      Type Parameters:
      T - The annotation type.
      Parameters:
      targetClass - target class
      annotationClass - annotation class
      Returns:
      annotation
    • extractAnnotationFromProxy

      @Nullable public static <T extends Annotation> T extractAnnotationFromProxy(Object targetProxy, Class<T> annotationClass)
      Extracts the annotation from the target implementation of the Proxy(ies)
      Type Parameters:
      T -
      Parameters:
      targetProxy - The proxy class
      annotationClass - The annotation to extract
      Returns: