code: private List<Method> findSubscriberMethods(Object subscriber) throws InvalidSubscriberException {
          List<Method> subscriberMethods = new ArrayList<Method>();
          Set<Method> allMethods = new HashSet<Method>();
          Method[] methods = subscriber.getClass().getMethods();
          allMethods.addAll(Arrays.asList(methods));
          // This enables declaring even private methods in a consumer. We will try to enable access, failure of which
          // will remove this method from the methods list.
          Method[] allDeclaredMethods = subscriber.getClass().getDeclaredMethods();
          allMethods.addAll(Arrays.asList(allDeclaredMethods));
          for (Method method : allMethods) {
              if (method.isAnnotationPresent(Subscribe.class)) {
                  try {
                      method.setAccessible(true);
                      subscriberMethods.add(method);
                  } catch (SecurityException e) {
                      LOGGER.error("A subscriber method: " + method.toGenericString() +
                                   " is not a public method and the security settings does not allow accessing non-public"
                                   +
                                   " methods via reflection. This subscriber method will not be registered.", e);
                  }
              }
          }
          Map<Method, String> errors = SubscriberValidator.validate(subscriber, subscriberMethods);
          if (!errors.isEmpty()) {
              throw new InvalidSubscriberException(subscriber.getClass(), errors);
          }
          return subscriberMethods;
      }
docs: Finds all the subscriber methods defined in the passed subscriber class. Also, validates whether the subscriber
  methods adhere to the rules of the game using {@link SubscriberValidator}
  
  @param subscriber Subscriber instance for which the subscriber methods are to be found.
  
  @return List of valid subscriber methods.
  
  @throws InvalidSubscriberException If any one of the method is invalid.