Add onLineContaining ...

...as it will often be easier to test against a particular line by referencing its content rather than figuring out the line number.
I do think that the structure would be clearer if it looked like this:
  ImmutableList<Long> matchingLineNumbers =
      CharSource.wrap(file.getCharContent(false))
          .readLines(matchingLinesProcessor);
  switch (matchingLineNumbers.size()) {

As it is you have to look back 20 lines to see where matchingLineNumbers comes from. Moving the `new LineProcessor` into a separate variable (or class) would still leave the structure you describe but avoid separating the definition and use of matchingLineNumbers by so much. Put another way, it avoids the reader's having to push "defining matchingLineNumbers" onto a mental stack while understanding the LineProcessor definition.