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 longserialVersionUIDprivate java.lang.StringsourceFileprivate static StackTraceFilterstackTraceFilterprivate java.lang.StringstackTraceLine
-
Constructor Summary
Constructors Modifier Constructor Description LocationImpl()LocationImpl(java.lang.Throwable stackTraceHolder, boolean isInline)LocationImpl(StackTraceFilter stackTraceFilter)privateLocationImpl(StackTraceFilter stackTraceFilter, java.lang.Throwable stackTraceHolder, boolean isInline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcomputeStackTraceInformation(StackTraceFilter stackTraceFilter, java.lang.Throwable stackTraceHolder, boolean isInline)Eagerly compute the stacktrace line from the stackTraceHolder.java.lang.StringgetSourceFile()Source file of this locationjava.lang.StringtoString()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:LocationHuman 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:LocationSource file of this location- Specified by:
getSourceFilein interfaceLocation- Returns:
- source file
-
-