cucumber.runtime.java.ObjectFactory Maven / Gradle / Ivy
package cucumber.runtime.java;
/**
* Minimal facade for Dependency Injection containers
*/
public interface ObjectFactory {
/**
* Instantiate glue code before scenario execution. Called once per scenario.
*/
void start();
/**
* Dispose glue code after scenario execution. Called once per scenario.
*/
void stop();
/**
* Collects glue classes in the classpath. Called once on init.
*
* @param glueClass
* Glue class containing cucumber.api annotations (Before, Given, When, ...)
*/
void addClass(Class> glueClass);
/**
* Provides the glue instances used to execute the current scenario. The instance can be prepared in
* {@link #start()}.
*
* @param glueClass
* type of instance to be created.
* @param
* type of Glue class
* @return new Glue instance of type
*/
T getInstance(Class glueClass);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy