@@ -0,0 +1,1169 @@
+package org.jeecqrs.commands.registry.autodiscover;%0A%0Aimport java.util.Iterator;%0Aimport java.util.logging.Logger;%0Aimport javax.annotation.PostConstruct;%0Aimport javax.enterprise.inject.Instance;%0Aimport javax.inject.Inject;%0Aimport org.jeecqrs.commands.CommandHandler;%0Aimport org.jeecqrs.commands.registry.AbstractCommandHandlerRegistry;%0A%0A/**%0A *%0A */%0Apublic class AutoDiscoverCommandHandlerRegistry%3CC%3E extends AbstractCommandHandlerRegistry%3CC%3E %7B%0A%0A    private Logger log = Logger.getLogger(AutoDiscoverCommandHandlerRegistry.class.getName());%0A%0A    @Inject%0A    private Instance%3CCommandHandler%3CC%3E%3E handlerInstances;%0A%0A    @PostConstruct%0A    public void startup() %7B%0A        log.info(%22Scanning command handlers%22);%0A%09Iterator%3CCommandHandler%3CC%3E%3E it = select(handlerInstances);%0A        if (!it.hasNext())%0A            log.warning(%22No CommandHandlers found%22);%0A%09while (it.hasNext()) %7B%0A            CommandHandler h = it.next();%0A            log.fine(%22Discovered CommandHandler: %22+ h);%0A            this.register(h.handledCommandType(), h);%0A%09%7D%0A    %7D%0A%0A    protected Iterator%3CCommandHandler%3CC%3E%3E select(Instance%3CCommandHandler%3CC%3E%3E instances) %7B%0A        return instances.iterator();%0A    %7D%0A    %0A%7D%0A

refactor package of AutoDiscoverCommandHandlerRegistry