Package io.cucumber.guice
Class SequentialScenarioScope
java.lang.Object
io.cucumber.guice.SequentialScenarioScope
- All Implemented Interfaces:
com.google.inject.Scope,ScenarioScope
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckState(boolean expression, String errorMessage) voidvoid<T> com.google.inject.Provider<T> scope(com.google.inject.Key<T> key, com.google.inject.Provider<T> unscoped) Scopes a provider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.inject.Scope
toString
-
Field Details
-
scenarioValues
-
-
Constructor Details
-
SequentialScenarioScope
SequentialScenarioScope()
-
-
Method Details
-
scope
public <T> com.google.inject.Provider<T> scope(com.google.inject.Key<T> key, com.google.inject.Provider<T> unscoped) Scopes a provider. The returned provider returns objects from this scope. If an object does not exist in this scope, the provider can use the given unscoped provider to retrieve one.Scope implementations are strongly encouraged to override
Object.toString()in the returned provider and include the backing provider'stoString()output.- Specified by:
scopein interfacecom.google.inject.Scope- Parameters:
key- binding keyunscoped- locates an instance when one doesn't already exist in this scope.- Returns:
- a new provider which only delegates to the given unscoped provider when an instance of the requested object doesn't already exist in this scope
-
enterScope
public void enterScope()- Specified by:
enterScopein interfaceScenarioScope
-
exitScope
public void exitScope()- Specified by:
exitScopein interfaceScenarioScope
-
checkState
-