Class LocationImpl

  • All Implemented Interfaces:
    java.io.Serializable, Location

    public class LocationImpl
    extends java.lang.Object
    implements Location, java.io.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • stackTraceLine

        private java.lang.String stackTraceLine
      • sourceFile

        private java.lang.String sourceFile
    • Constructor Detail

      • LocationImpl

        public LocationImpl()
      • LocationImpl

        public LocationImpl​(java.lang.Throwable stackTraceHolder,
                            boolean isInline)
      • LocationImpl

        private LocationImpl​(StackTraceFilter stackTraceFilter,
                             java.lang.Throwable stackTraceHolder,
                             boolean isInline)
    • Method Detail

      • toString

        public java.lang.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 java.lang.Object
        Returns:
        location
      • computeStackTraceInformation

        private void computeStackTraceInformation​(StackTraceFilter stackTraceFilter,
                                                  java.lang.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 java.lang.String getSourceFile()
        Description copied from interface: Location
        Source file of this location
        Specified by:
        getSourceFile in interface Location
        Returns:
        source file