public class ThrowableCallStack extends Object implements CallStack
Throwable. This strategy, while slower than the
SecurityManager implementation, provides call stack method names and other metadata in addition to the call stack
of classes.Throwable.fillInStackTrace()| Constructor and Description |
|---|
ThrowableCallStack(String messageFormat,
boolean useTimestamp)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the current stack trace snapshot.
|
void |
fillInStackTrace()
Takes a snapshot of the current call stack.
|
boolean |
printStackTrace(PrintWriter writer)
Prints the current stack trace if available to a PrintWriter.
|
public ThrowableCallStack(String messageFormat, boolean useTimestamp)
messageFormat - message formatuseTimestamp - whether to format the dates in the output message or notpublic boolean printStackTrace(PrintWriter writer)
CallStackPooledObject usage in user code.printStackTrace in interface CallStackwriter - a PrintWriter to write the current stack trace to if availablepublic void fillInStackTrace()
CallStackCallStack.printStackTrace(PrintWriter) will print
out that stack trace until it is cleared.fillInStackTrace in interface CallStackpublic void clear()
CallStackCallStack.printStackTrace(PrintWriter) will be
no-ops until another call to CallStack.fillInStackTrace().Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.