* the Configuration
* @return A List of CandidateSteps instances
*/
public List<CandidateSteps> buildCandidateSteps(Configuration configuration) {
List<Object> stepsInstances = new ArrayList<Object>();
InjectableStepsFactory factory = null;
if (finder.isAnnotationPresent(UsingSteps.class)) {
List<Class<Object>> stepsClasses = finder.getAnnotatedClasses(UsingSteps.class, Object.class, "instances");
for (Class<Object> stepsClass : stepsClasses) {
stepsInstances.add(instanceOf(Object.class, stepsClass));
}
factory = new InstanceStepsFactory(configuration, stepsInstances);
} else {
annotationMonitor.annotationNotFound(UsingSteps.class, annotatedClass);
}
if (factory == null) {
factory = new InstanceStepsFactory(configuration);
}
return factory.createCandidateSteps();
}