Class AbstractStepsFactory

All Implemented Interfaces:
Direct Known Subclasses:
InstanceStepsFactory, ScanningStepsFactory

public abstract class AbstractStepsFactory extends Object implements InjectableStepsFactory

An abstract implementation of InjectableStepsFactory that is provided by concrete subclasses Object instances which contain the candidate steps methods. The Object instances are wrapped by Steps.

The object instances are also inspected for methods annotated by AsParameterConverter and the ParameterConverters.ParameterConverter is configured accordingly.

  • Constructor Details

    • AbstractStepsFactory

      public AbstractStepsFactory(Configuration configuration)
  • Method Details

    • createCandidateSteps

      public List<CandidateSteps> createCandidateSteps()
      Specified by:
      createCandidateSteps in interface InjectableStepsFactory
    • stepsTypes

      protected abstract List<Class<?>> stepsTypes()
    • hasAnnotatedMethods

      protected boolean hasAnnotatedMethods(Type type)
      Determines if the given type is a Class containing at least one method annotated with annotations from package "org.jbehave.core.annotations".
      type - the Type of the steps instance
      A boolean, true if at least one annotated method is found.