@Test public void shouldIgnoreWithCustomLineNumber() { final Throwable x = new Throwable(); final StackTraceElement nonThree = new StackTraceElement("lotro.Bilbo", "smokes", "Bilbo.java", 5); x.setStackTrace(new StackTraceElement[]{ new StackTraceElement("windfola.Frodo", "lives", "Frodo.java", 3), nonThree}); assertFramesRemaining(x, new StackTraceFocuser<>(ignoreLineNumber(compile("3"))), nonThree); }
@Nonnull public static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber) { return frame -> lineNumber.matcher(String.valueOf(frame.getLineNumber())).find(); }
StackTraceFocuser implements Function<E, E> { @Nonnull public static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber) { return frame -> lineNumber.matcher(String.valueOf(frame.getLineNumber())).find(); } }
StackTraceFocuser implements Function<E, E> { @Nonnull public static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber) { return frame -> lineNumber.matcher(String.valueOf(frame.getLineNumber())).find(); } StackTraceFocuser(@Nonnull final Iterable<Predicate<StackTraceElement>> ignores); @SafeVarargs  StackTraceFocuser(@Nonnull final Predicate<StackTraceElement> first,
            final Predicate<StackTraceElement>... rest); }
StackTraceFocuser implements Function<E, E> { @Nonnull public static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber) { return frame -> lineNumber.matcher(String.valueOf(frame.getLineNumber())).find(); } StackTraceFocuser(@Nonnull final Iterable<Predicate<StackTraceElement>> ignores); @SafeVarargs  StackTraceFocuser(@Nonnull final Predicate<StackTraceElement> first,
            final Predicate<StackTraceElement>... rest); @Nonnull static StackTraceFocuser<E> ignoreClassNames(
            @Nonnull final List<Pattern> classNameIgnores); @Nonnull static StackTraceFocuser<E> ignoreJavaClasses(); @Override E apply(final E e); @Nonnull static Predicate<StackTraceElement> ignoreClassName(@Nonnull final Pattern className); @Nonnull static Predicate<StackTraceElement> ignoreMethodName(@Nonnull final Pattern methodName); @Nonnull static Predicate<StackTraceElement> ignoreFileName(@Nonnull final Pattern fileName); @Nonnull static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber); }
StackTraceFocuser implements Function<E, E> { @Nonnull public static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber) { return frame -> lineNumber.matcher(String.valueOf(frame.getLineNumber())).find(); } StackTraceFocuser(@Nonnull final Iterable<Predicate<StackTraceElement>> ignores); @SafeVarargs  StackTraceFocuser(@Nonnull final Predicate<StackTraceElement> first,
            final Predicate<StackTraceElement>... rest); @Nonnull static StackTraceFocuser<E> ignoreClassNames(
            @Nonnull final List<Pattern> classNameIgnores); @Nonnull static StackTraceFocuser<E> ignoreJavaClasses(); @Override E apply(final E e); @Nonnull static Predicate<StackTraceElement> ignoreClassName(@Nonnull final Pattern className); @Nonnull static Predicate<StackTraceElement> ignoreMethodName(@Nonnull final Pattern methodName); @Nonnull static Predicate<StackTraceElement> ignoreFileName(@Nonnull final Pattern fileName); @Nonnull static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber);  }