code: public void register(final Object listener) {
  		for (Class clazz = listener.getClass(); clazz != null; clazz = clazz.getSuperclass()) {
  			Method[] methods = clazz.getMethods();
  			for (Method m : methods) {
  				if (!m.isAnnotationPresent(Subscribe.class)) continue;
  				Class[] params = m.getParameterTypes();
  
  				if (params.length != 1)
  					throw new IllegalArgumentException("Method " + m + " has @Subscribe annotation" +
  							"and requires " + params.length +
  							" arguments, but event-handling methods must require just one argument");
  				Class event = params[0];
  				EventHandler handler = new EventHandler(listener, m);
  				this.handlersByEventType.put(event, handler);
  			}
  		}
  	}
docs: Registers the object as an event-handler for all methods of its class or superclasses that have the {@link Subscribe} annotation.
  
  @param listener The object to register as an event-handler.