CallerFinder

public final class CallerFinder

A helper class for determining callers of a specified class currently on the stack.

See also

<a href="https://github.com/google/flogger/blob/cb9e836a897d36a78309ee8badf5cad4e6a2d3d8/api/src/main/java/com/google/common/flogger/util/CallerFinder.java">

Original Java code of Google Flogger

Functions

Link copied to clipboard
@Nullable()
public static @Nullable() StackTraceElement findCallerOf(Class<? extends Object> target, int skip)
Returns the stack trace element of the immediate caller of the specified class.
Link copied to clipboard
public static Array<StackTraceElement> getStackForCallerOf(Class<? extends Object> target, int maxDepth, int skip)
Returns a synthetic stack trace starting at the immediate caller of the specified target.