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()
| Modifier and Type | Class and Description |
|---|---|
| private static class | ThrowableCallStack.Snapshot
A snapshot of a throwable. |
| Modifier and Type | Field and Description |
|---|---|
| private final DateFormat | |
| private final String | |
| private volatile ThrowableCallStack. |
| Access | Constructor and Description |
|---|---|
| public | ThrowableCallStack(final String
message format messageFormat, final boolean whether to format the dates in the output message or not useTimestamp)Creates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements org. |
| public void | fillInStackTrace()
Implements org. |
| public synchronized boolean | printStackTrace(final PrintWriter
a PrintWriter to write the current stack trace to if available writer)Implements org. |
| dateFormat | back to summary |
|---|---|
| private final DateFormat dateFormat | |
| messageFormat | back to summary |
|---|---|
| private final String messageFormat | |
| snapshot | back to summary |
|---|---|
| private volatile ThrowableCallStack. | |
| ThrowableCallStack | back to summary |
|---|---|
| public ThrowableCallStack(final String messageFormat, final boolean useTimestamp) Creates a new instance.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements org. Doc from org. Clears the current stack trace snapshot. Subsequent calls to
| |
| fillInStackTrace | back to summary |
|---|---|
| public void fillInStackTrace() Implements org. Doc from org. Takes a snapshot of the current call stack. Subsequent calls to
| |
| printStackTrace | back to summary |
|---|---|
| public synchronized boolean printStackTrace(final PrintWriter writer) Implements org. Doc from org. Prints the current stack trace if available to a PrintWriter. The format is undefined and is primarily useful
for debugging issues with
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final long |
| Access | Constructor and Description |
|---|---|
| private |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| timestampMillis | back to summary |
|---|---|
| private final long timestampMillis | |
| Snapshot | back to summary |
|---|---|
| private Snapshot() | |