code: public Method findFirstMethod( Pattern methodNamePattern ) {
          final Method[] allMethods = this.targetClass.getMethods();
          for (int i = 0; i < allMethods.length; i++) {
              final Method m = allMethods[i];
              if (methodNamePattern.matcher(m.getName()).matches()) {
                  return m;
              }
          }
          return null;
      }
docs: Find the method on the target class that matches the supplied method name.
  
  @param methodNamePattern the regular expression pattern for the name of the method that is to be found.
  @return the first Method object found that has a matching name, or null if there are no methods that have a matching name.