Package org.mockito.internal.debugging
Class LocationImpl
- java.lang.Object
-
- org.mockito.internal.debugging.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 Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private java.lang.String
sourceFile
private static StackTraceFilter
stackTraceFilter
private java.lang.String
stackTraceLine
-
Constructor Summary
Constructors Modifier Constructor Description LocationImpl()
LocationImpl(java.lang.Throwable stackTraceHolder, boolean isInline)
LocationImpl(StackTraceFilter stackTraceFilter)
private
LocationImpl(StackTraceFilter stackTraceFilter, java.lang.Throwable stackTraceHolder, boolean isInline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
computeStackTraceInformation(StackTraceFilter stackTraceFilter, java.lang.Throwable stackTraceHolder, boolean isInline)
Eagerly compute the stacktrace line from the stackTraceHolder.java.lang.String
getSourceFile()
Source file of this locationjava.lang.String
toString()
Human readable location in the source code, seeInvocation.getLocation()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
stackTraceFilter
private static final StackTraceFilter stackTraceFilter
-
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
public LocationImpl(StackTraceFilter stackTraceFilter)
-
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, seeInvocation.getLocation()
-
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 interfaceLocation
- Returns:
- source file
-
-