code: public static <T> List<T> findAll(CharSequence self, Pattern pattern, @ClosureParams(value=SimpleType.class, options="java.lang.String[]") Closure<T> closure) {
          Matcher matcher = pattern.matcher(self.toString());
          return DefaultGroovyMethods.collect(matcher, closure);
      }
docs: Finds all occurrences of a compiled regular expression Pattern within a CharSequence. Any matches are passed to
  the specified closure.  The closure is expected to have the full match in the first parameter.  If there are any
  capture groups, they will be placed in subsequent parameters.
  <p>
  If there are no matches, the closure will not be called, and an empty List will be returned.
  <p>
  For example, if the pattern doesn't match, it returns an empty list:
  <pre>
  assert [] == "foo".findAll(~/(\w*) Fish/) { match, firstWord -> return firstWord }
  </pre>
  Any regular expression matches are passed to the closure, if there are no capture groups, there will be one
  parameter for the match:
  <pre>
  assert ["couldn't", "wouldn't"] == "I could not, would not, with a fox.".findAll(~/.ould/) { match -> "${match}n't"}
  </pre>
  If there are capture groups, the first parameter will be the match followed by one parameter for each capture group:
  <pre>
  def orig = "There's a Wocket in my Pocket"
  assert ["W > Wocket", "P > Pocket"] == orig.findAll(~/(.)ocket/) { match, firstLetter -> "$firstLetter > $match" }
  </pre>
  
  @param self    a CharSequence
  @param pattern the compiled regex Pattern
  @param closure will be passed the full match plus each of the capturing groups (if any)
  @return a List containing all results from calling the closure with each full match (and potentially capturing groups) of the regex pattern within the CharSequence, an empty list will be returned if there are no matches
  @see #findAll(String, java.util.regex.Pattern, groovy.lang.Closure)
  @since 1.8.2