ClassLoader currentClassLoader = this.getClass().getClassLoader();
final DefaultClassLoadingPicoContainer pageObjects = new DefaultClassLoadingPicoContainer(currentClassLoader,
store, primordial);
pageObjects.change(Characteristics.USE_NAMES);
// This loads all the Groovy page objects - can be stateful
pageObjects.visit(new ClassName("pages.Home"), ".*\\.class", true,
new DefaultClassLoadingPicoContainer.ClassVisitor() {
public void classFound(@SuppressWarnings("rawtypes") Class clazz) {
pageObjects.addComponent(clazz);
}
});