• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.mockito.exceptions.stacktrace;
2 
3 import org.mockito.Incubating;
4 
5 /**
6  * Decides if particular StackTraceElement is excluded from the human-readable stack trace output.
7  * Mockito stack trace filtering mechanism uses this information.
8  * <p>
9  * Excluding an element will make it not show in the cleaned stack trace.
10  * Not-excluding an element does not guarantee it will be shown
11  * (e.g. it depends on the implementation of
12  * Mockito internal {@link org.mockito.internal.exceptions.stacktrace.StackTraceFilter}).
13  * <p>
14  * The implementations are required to be thread safe. For example, make them stateless.
15  * <p>
16  * See the default implementation: {@link org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner}.
17  *
18  */
19 @Incubating
20 public interface StackTraceCleaner {
21 
22     /**
23      * Decides if element is excluded.
24      *
25      * @param candidate element of the actual stack trace
26      * @return whether the element should be excluded from cleaned stack trace.
27      */
isOut(StackTraceElement candidate)28     boolean isOut(StackTraceElement candidate);
29 }
30