Package dev.galasa.framework
Interface IAnnotationExtractor
public interface IAnnotationExtractor
Something which can extract annotations from something can be an AnnotationExtractor
-
Method Summary
Modifier and TypeMethodDescription<A,B extends Annotation>
BgetAnnotation(Class<A> testClass, Class<B> annotationClass)
-
Method Details
-
getAnnotation
- Type Parameters:
A- The type of testclass we are extracting something from. This will vary wildly based on what the users' test class is.B- The annotation type we want to extract. Having this as a generic type allows this logic to be used for any of the annotations we want to extract. B must extend Annotation.- Parameters:
testClass- The test class we want annotations extracted from.annotationClass- The annotation class we want to use.- Returns:
- An instance of the annotationClass, extracted from the test class.
-