code: private void evaluateMethod(Object listener, Class<? extends Annotation> annotation, Method method, Map<Object, Set<Method>> methods) {
          if (method.isAnnotationPresent(annotation)) {
              if (method.getParameterTypes().length != 1) {
                  throw new XOException("Life cycle method '" + method.toGenericString() + "' annotated with '" + annotation.getName()
                          + "' must declare exactly one parameter but declares " + method.getParameterTypes().length + ".");
              }
              Set<Method> listenerMethods = methods.get(listener);
              if (listenerMethods == null) {
                  listenerMethods = new HashSet<>();
                  methods.put(listener, listenerMethods);
              }
              listenerMethods.add(method);
          }
      }
docs: Evaluates a method if an annotation is present and if true adds to the map of
  life cycle methods.
  
  @param listener
  The listener instance.
  @param annotation
  The annotation to check for.
  @param method
  The method to evaluate.
  @param methods
  The map of methods.