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 customObjectFactoryfor cucumber tests and is based on the basicGuiceFactoryimplementation which can't be extended. That implementation works well when there is only singleWorldimplementation 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 customObjectFactoryfrom this class, register it inMETA-INF/services/io.cucumber.core.backend.ObjectFactoryand then reference it directly in theCucumberOptionsannotation for the test class.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractGuiceFactory(com.google.inject.Injector injector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddClass(Class<?> clazz)<T> TgetInstance(Class<T> clazz)voidstart()voidstop()
-
-
-
Method Detail
-
addClass
public boolean addClass(Class<?> clazz)
- Specified by:
addClassin interfaceio.cucumber.core.backend.Container
-
start
public void start()
- Specified by:
startin interfaceio.cucumber.core.backend.ObjectFactory
-
stop
public void stop()
- Specified by:
stopin interfaceio.cucumber.core.backend.ObjectFactory
-
getInstance
public <T> T getInstance(Class<T> clazz)
- Specified by:
getInstancein interfaceio.cucumber.core.backend.Lookup
-
-