Interface StackTraceCleaner
-
public interface StackTraceCleaner
Decides if particular StackTraceElement is excluded from the human-readable stack trace output. Mockito stack trace filtering mechanism uses this information.Excluding an element will make it not show in the cleaned stack trace. Not-excluding an element does not guarantee it will be shown (e.g. it depends on the implementation of Mockito internal cleaner).
The implementations are required to be thread safe ; for example, make them stateless.
See also the Mockito default implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
StackTraceCleaner.StackFrameMetadata
Very similar to the StackFrame class declared on the StackWalker api.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
isIn(StackTraceElement candidate)
Decides if element is included.default boolean
isIn(StackTraceCleaner.StackFrameMetadata candidate)
It's recommended to override this method in subclasses to avoid potentially costly re-boxing operations.
-
-
-
Method Detail
-
isIn
boolean isIn(StackTraceElement candidate)
Decides if element is included.- Parameters:
candidate
- element of the actual stack trace- Returns:
- whether the element should be excluded from cleaned stack trace.
-
isIn
default boolean isIn(StackTraceCleaner.StackFrameMetadata candidate)
It's recommended to override this method in subclasses to avoid potentially costly re-boxing operations.
-
-