Class SequentialScenarioScope

java.lang.Object
io.cucumber.guice.SequentialScenarioScope
All Implemented Interfaces:
com.google.inject.Scope, ScenarioScope

class SequentialScenarioScope extends Object implements ScenarioScope
  • Field Details

    • scenarioValues

      private @Nullable Map<com.google.inject.Key<?>,Object> 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's toString() output.

      Specified by:
      scope in interface com.google.inject.Scope
      Parameters:
      key - binding key
      unscoped - 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:
      enterScope in interface ScenarioScope
    • exitScope

      public void exitScope()
      Specified by:
      exitScope in interface ScenarioScope
    • checkState

      private void checkState(boolean expression, String errorMessage)