public final class Signal
extends java.lang.Error
Error
which is used to signal some state or request by throwing it.
Signal
has an empty stack trace and has no cause to save the instantiation overhead.Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Boolean> |
map |
private static long |
serialVersionUID |
private UniqueName |
uname |
Constructor and Description |
---|
Signal(java.lang.String name)
Deprecated.
Use
valueOf(String) instead. |
Modifier and Type | Method and Description |
---|---|
void |
expect(Signal signal)
Check if the given
Signal is the same as this instance. |
java.lang.Throwable |
fillInStackTrace() |
java.lang.Throwable |
initCause(java.lang.Throwable cause) |
java.lang.String |
toString() |
static Signal |
valueOf(java.lang.String name)
Creates a new
Signal with the specified name . |
private static final long serialVersionUID
private static final java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Boolean> map
private final UniqueName uname
@Deprecated public Signal(java.lang.String name)
valueOf(String)
instead.public static Signal valueOf(java.lang.String name)
Signal
with the specified name
.public void expect(Signal signal)
Signal
is the same as this instance. If not an IllegalStateException
will
be thrown.public java.lang.Throwable initCause(java.lang.Throwable cause)
initCause
in class java.lang.Throwable
public java.lang.Throwable fillInStackTrace()
fillInStackTrace
in class java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Throwable