All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.galasa.framework.IAnnotationExtractor Maven / Gradle / Ivy

There is a newer version: 0.37.0
Show newest version
/*
 * Copyright contributors to the Galasa project
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package dev.galasa.framework;

import java.lang.annotation.Annotation;

/**
 * Something which can extract annotations from something can be an AnnotationExtractor
 */
public interface IAnnotationExtractor {    
    /**
    * @param  The type of testclass we are extracting something from. 
    * This will vary wildly based on what the users' test class is.
    * @param  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.
    * @param testClass The test class we want annotations extracted from.
    * @param annotationClass The annotation class we want to use.
    * @return An instance of the annotationClass, extracted from the test class.
    */
    public  B getAnnotation (Class testClass, Class annotationClass);
}