Class Java8LocationImpl

java.lang.Object
org.mockito.internal.debugging.Java8LocationImpl
All Implemented Interfaces:
Serializable, Location

class Java8LocationImpl extends Object implements Location, Serializable
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • stackTraceFilter

      private static final StackTraceFilter stackTraceFilter
    • stackTraceLine

      private String stackTraceLine
    • sourceFile

      private String sourceFile
  • Constructor Details

    • Java8LocationImpl

      public Java8LocationImpl(Throwable stackTraceHolder, boolean isInline)
    • Java8LocationImpl

      private Java8LocationImpl(StackTraceFilter stackTraceFilter, Throwable stackTraceHolder, boolean isInline)
  • Method Details

    • toString

      public String toString()
      Description copied from interface: Location
      Human readable location in the source code, see Invocation.getLocation()
      Specified by:
      toString in interface Location
      Overrides:
      toString in class Object
      Returns:
      location
    • computeStackTraceInformation

      private void computeStackTraceInformation(StackTraceFilter stackTraceFilter, Throwable stackTraceHolder, boolean isInline)
      Eagerly compute the stacktrace line from the stackTraceHolder. Storing the Throwable is memory-intensive for tests that have large stacktraces and have a lot of invocations on mocks.
    • getSourceFile

      public String getSourceFile()
      Description copied from interface: Location
      Source file of this location
      Specified by:
      getSourceFile in interface Location
      Returns:
      source file