cucumber.runtime.arquillian.container.CukeSpaceCDIObjectFactory Maven / Gradle / Ivy
package cucumber.runtime.arquillian.container;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.CDI;
import java.util.ArrayList;
import java.util.Collection;
// base class to ease custom lookups of steps
public class CukeSpaceCDIObjectFactory extends ContextualObjectFactoryBase {
private final Collection> contexts = new ArrayList<>();
@Override
public T getInstance(final Class glueClass) {
final BeanManager beanManager = CDI.current().getBeanManager();
final Bean> bean = beanManager.resolve(beanManager.getBeans(glueClass));
final CreationalContext
© 2015 - 2025 Weber Informatics LLC | Privacy Policy