Package io.github.resilience4j.utils
Class AnnotationExtractor
java.lang.Object
io.github.resilience4j.utils.AnnotationExtractor
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
Textract annotation from target classstatic <T extends Annotation>
TextractAnnotationFromProxy
(Object targetProxy, Class<T> annotationClass) Extracts the annotation from the target implementation of the Proxy(ies)
-
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 classannotationClass
- 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 classannotationClass
- The annotation to extract- Returns:
-