@Test public void testFindAllHandlers_both2() throws NoSuchMethodException { BothSub2 bothSub = new BothSub2(); Map<Class<? >, Set<EventHandler>> map = new BothHandlerFinder().findAllHandlers(bothSub); assertTrue(map.containsKey(SimpleEvent.class)); Collection<EventHandler> handlers = map.get(SimpleEvent.class); assertTrue(handlers.size() == 1); assertTrue(map.get(SimpleEvent.class).contains(new EventHandler(bothSub,bothSub.getClass().getMethod(ISubscribe.methodName,SimpleEvent.class)))); }
@Override public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) { Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener); putAll(multimap,this.listenersFinder.findAllHandlers(listener)); return multimap; }
BothHandlerFinder extends AbstractHandlerFinder { @Override public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) { Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener); putAll(multimap,this.listenersFinder.findAllHandlers(listener)); return multimap; } }
BothHandlerFinder extends AbstractHandlerFinder { @Override public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) { Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener); putAll(multimap,this.listenersFinder.findAllHandlers(listener)); return multimap; } BothHandlerFinder(); }
BothHandlerFinder extends AbstractHandlerFinder { @Override public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) { Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener); putAll(multimap,this.listenersFinder.findAllHandlers(listener)); return multimap; } BothHandlerFinder(); @Override Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener); @Override AbstractHandlerFinder setStorage(EventStorage storage); }
BothHandlerFinder extends AbstractHandlerFinder { @Override public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) { Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener); putAll(multimap,this.listenersFinder.findAllHandlers(listener)); return multimap; } BothHandlerFinder(); @Override Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener); @Override AbstractHandlerFinder setStorage(EventStorage storage);  }