public class AbstractGuiceFactory extends Object implements io.cucumber.core.backend.ObjectFactory
ObjectFactory for cucumber tests and is based on the basic
GuiceFactory implementation which can't be extended. That implementation works well when there is only
single World implementation to test or if the requirements are such that system properties or environment
variables can otherwise suffice in controlling the test environment to the provider's satisfaction. In other cases,
it may simply be easier to create a custom ObjectFactory from this class, register it in
META-INF/services/io.cucumber.core.backend.ObjectFactory and then reference it directly in the
CucumberOptions annotation for the test class.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGuiceFactory(com.google.inject.Injector injector) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addClass(Class<?> clazz) |
<T> T |
getInstance(Class<T> clazz) |
void |
start() |
void |
stop() |
protected AbstractGuiceFactory(com.google.inject.Injector injector)
public boolean addClass(Class<?> clazz)
addClass in interface io.cucumber.core.backend.Containerpublic void start()
start in interface io.cucumber.core.backend.ObjectFactorypublic void stop()
stop in interface io.cucumber.core.backend.ObjectFactorypublic <T> T getInstance(Class<T> clazz)
getInstance in interface io.cucumber.core.backend.LookupCopyright © 2013–2022 Apache Software Foundation. All rights reserved.