String name = event.getSubject().substring("cdi.event:".length());
try {
if (observedEvents.containsKey(name) && event.getCount() == 1 && event.isNew()) {
final Class<?> type = this.getClass().getClassLoader().loadClass(name);
abd.addObserverMethod(new EventObserverMethod(type, bus, mgr));
if (observedEvents != null) {
for (Annotation[] qualifiers : observedEvents.get(name)) {
abd.addObserverMethod(new EventObserverMethod(type, bus, mgr, qualifiers));
}
}
}
} catch (Exception e) {
throw new RuntimeException(e);