Class AbstractGuiceFactory
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.features.AbstractGuiceFactory
-
- All Implemented Interfaces:
io.cucumber.core.backend.Container
,io.cucumber.core.backend.Lookup
,io.cucumber.core.backend.ObjectFactory
public class AbstractGuiceFactory extends Object implements io.cucumber.core.backend.ObjectFactory
Base class for implementing a customObjectFactory
for cucumber tests and is based on the basicGuiceFactory
implementation which can't be extended. That implementation works well when there is only singleWorld
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 customObjectFactory
from this class, register it inMETA-INF/services/io.cucumber.core.backend.ObjectFactory
and then reference it directly in theCucumberOptions
annotation for the test class.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractGuiceFactory(com.google.inject.Injector injector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addClass(Class<?> clazz)
<T> T
getInstance(Class<T> clazz)
void
start()
void
stop()
-
-
-
Method Detail
-
addClass
public boolean addClass(Class<?> clazz)
- Specified by:
addClass
in interfaceio.cucumber.core.backend.Container
-
start
public void start()
- Specified by:
start
in interfaceio.cucumber.core.backend.ObjectFactory
-
stop
public void stop()
- Specified by:
stop
in interfaceio.cucumber.core.backend.ObjectFactory
-
getInstance
public <T> T getInstance(Class<T> clazz)
- Specified by:
getInstance
in interfaceio.cucumber.core.backend.Lookup
-
-