Skip to content

Instantly share code, notes, and snippets.

@cajar1988 cajar1988/gist:1d5465aa68dc8d08ccf5 Secret
Last active Dec 23, 2015

What would you like to do?
public void initHandlerMap() {
BeanManager beanManager = BeanManagerProvider.retrieve();
Set<Bean<?>> allHandlers = beanManager.getBeans(CommandHandler.class);
for (Bean<?> bean : allHandlers) {
Class<?> handlerClass = bean.getBeanClass();
handlers.put(getHandledCommandType(handlerClass), bean.getName());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.