public class StaticThrowableStorage
extends java.lang.Throwable
StaticThrowable
. This call is visible
so that an application can extend an existing conventional Java throwable
and still implement StaticThrowable
; its methods can be implemented
using the methods defined in this class. An application defined throwable
that does not need to extend an existing conventional Java throwable should
extend one of StaticCheckedException
, StaticRuntimeException
,
or StaticError
instead.Modifier and Type | Field and Description |
---|---|
static char[] |
BAD_MESSAGE |
static javax.realtime.StaticThrowableStorage.StaticStackTraceElement[] |
EMPTY_TRACE
A single copy of an empty stack trace.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
fillInStackTrace()
Captures the current thread's stack trace and saves it in thread
local storage.
|
java.lang.Throwable |
getCause()
Gets the cause from thread local storage that was saved by the last
preallocated exception thrown.
|
static StaticThrowableStorage |
getCurrent()
A means of obtaining the storage object for the current task and throwable.
|
StaticThrowable<?> |
getLastThrown()
Determine for what throwable the data is valid;
|
java.lang.String |
getLocalizedMessage() |
java.lang.String |
getMessage()
Gets the message from thread local storage that was saved by the last
preallocated exception thrown.
|
java.lang.StackTraceElement[] |
getStackTrace()
Gets the stack trace from thread local storage that was saved by the last
preallocated exception thrown.
|
java.lang.Throwable |
initCause(java.lang.Throwable cause)
Saves the message in thread local storage for later retrieval.
|
static StaticThrowableStorage |
initCurrent(StaticThrowable<?> throwable)
Obtaining the storage object for the current task and initialize it.
|
StaticThrowableStorage |
initMessage(java.lang.String message)
Saves the message in thread local storage for later retrieval.
|
void |
printStackTrace() |
void |
printStackTrace(java.io.PrintStream stream) |
void |
printStackTrace(java.io.PrintWriter writer) |
void |
setStackTrace(java.lang.StackTraceElement[] stackTrace) |
public static final javax.realtime.StaticThrowableStorage.StaticStackTraceElement[] EMPTY_TRACE
public static final char[] BAD_MESSAGE
public static StaticThrowableStorage getCurrent()
public static StaticThrowableStorage initCurrent(StaticThrowable<?> throwable)
java.lang.NullPointerException
- when throwable
is null
public StaticThrowable<?> getLastThrown()
public java.lang.Throwable fillInStackTrace()
fillInStackTrace
in class java.lang.Throwable
this
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public StaticThrowableStorage initMessage(java.lang.String message)
message
- The description to save.this
public java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
null
when none was set.public java.lang.Throwable initCause(java.lang.Throwable cause)
initCause
in class java.lang.Throwable
cause
- In the case of cascading throwables, the
exception or error that was the original cause.this
public java.lang.StackTraceElement[] getStackTrace()
getStackTrace
in class java.lang.Throwable
public java.lang.String getLocalizedMessage()
getLocalizedMessage
in class java.lang.Throwable
public void setStackTrace(java.lang.StackTraceElement[] stackTrace)
setStackTrace
in class java.lang.Throwable
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter writer)
printStackTrace
in class java.lang.Throwable
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.