static StackTraceElement[] trimStackTrace(StackTraceElement[] stackTrace) {
    LinkedList<StackTraceElement> list = Lists.newLinkedList();
    for (int i = stackTrace.length - 1; i >= 0; i--) {
      StackTraceElement s = stackTrace[i];
      if (s.getClassName().startsWith(Checkers.class.getPackage().getName())) {
        break;
      }
      list.addLast(s);
    }
    return list.toArray(new StackTraceElement[list.size()]);
  }
The match wrapper.
@param <T> the generic type
testing/src/org/immutables/check/ObjectChecker.java