code: private static Method findGetTopologyMethod(Object topologySource, String methodName) throws NoSuchMethodException {
          Class clazz = topologySource.getClass();
          Method[] methods =  clazz.getMethods();
          ArrayList<Method> candidates = new ArrayList<Method>();
          for(Method method : methods){
              if(!method.getName().equals(methodName)){
                  continue;
              }
              if(!method.getReturnType().equals(StormTopology.class)){
                  continue;
              }
              Class[] paramTypes = method.getParameterTypes();
              if(paramTypes.length != 1){
                  continue;
              }
              if(paramTypes[0].isAssignableFrom(Map.class) || paramTypes[0].isAssignableFrom(Config.class)){
                  candidates.add(method);
              }
          }
  
          if(candidates.size() == 0){
              throw new IllegalArgumentException("Unable to find method '" + methodName + "' method in class: " + clazz.getName());
          } else if (candidates.size() > 1){
              LOG.warn("Found multiple candidate methods in class '" + clazz.getName() + "'. Using the first one found");
          }
  
          return candidates.get(0);
      }
docs: Given a `java.lang.Object` instance and a method name, attempt to find a method that matches the input
  parameter: `java.util.Map` or `org.apache.storm.Config`.
  
  @param topologySource object to inspect for the specified method
  @param methodName name of the method to look for
  @return
  @throws NoSuchMethodException