Interface IAnnotationExtractor


public interface IAnnotationExtractor
Something which can extract annotations from something can be an AnnotationExtractor
  • Method Summary

    Modifier and Type
    Method
    Description
    <A, B extends Annotation>
    B
    getAnnotation(Class<A> testClass, Class<B> annotationClass)
     
  • Method Details

    • getAnnotation

      <A, B extends Annotation> B getAnnotation(Class<A> testClass, Class<B> annotationClass)
      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.