io.cucumber.guice.CucumberScopes Maven / Gradle / Ivy
package io.cucumber.guice;
import com.google.inject.Module;
import org.apiguardian.api.API;
/**
* Creates an instance of {@link ScenarioScope} for use when declaring bindings
* in implementations of {@link Module}.
*
* Note that when binding objects to the scenario scope it is recommended to
* bind them to the {@link ScenarioScoped} annotation instead. E.g:
* bind(ScenarioScopedObject.class).in(ScenarioScoped.class);
*/
@API(status = API.Status.STABLE)
public final class CucumberScopes {
private CucumberScopes() {
}
/**
* Creates a new instance of a ScenarioScope.
*
* @return a new instance of a ScenarioScope.
*/
public static ScenarioScope createScenarioScope() {
return new SequentialScenarioScope();
}
}