public class Alert extends java.lang.RuntimeException implements java.lang.Iterable<Culprit>
Constructor and Description |
---|
Alert() |
Alert(java.lang.String message) |
Alert(java.lang.String message,
java.lang.Throwable cause)
This is the most general constructor, which simply invokes the super
class constructor with the same arguments.
|
Alert(java.lang.Throwable cause) |
Modifier and Type | Method and Description |
---|---|
Alert |
code(@NonNull java.lang.String string) |
Alert |
culprit(java.lang.Iterable<Culprit> list) |
Alert |
culprit(@NonNull java.lang.String desc,
char ch) |
Alert |
culprit(@NonNull java.lang.String desc,
int arg) |
Alert |
culprit(@NonNull java.lang.String desc,
java.lang.Object arg) |
Culprit |
get(java.lang.String key) |
java.lang.String |
getCodeString() |
boolean |
hasKey(java.lang.String k) |
boolean |
hasKeyValue(java.lang.String k,
java.lang.Object v) |
Alert |
hint(@NonNull java.lang.String msg)
This is a convenient method for adding a culprit with
the "hint" key.
|
static Alert |
internalError()
A convenience method for building an Alert that is suitable
for signalling that some part of the object state has entered
a condition that the programmer intends to be impossible.
|
static Alert |
internalError(java.lang.String msg)
A convenience method for building an Alert that is suitable
for signalling that some part of the object state has entered
a condition that the programmer intends to be impossible.
|
java.util.Iterator<Culprit> |
iterator()
This is a service method for reporting.
|
Alert |
note(@NonNull java.lang.String string) |
void |
report() |
void |
reportTo(java.io.PrintWriter pw) |
java.lang.String |
toString() |
static Alert |
unimplemented()
A convenience method for building an Alert that is suitable
to act as a placeholder for unfinished work.
|
static Alert |
unimplemented(java.lang.String msg)
A convenience method for building an Alert that is suitable
to act as a placeholder for unfinished work.
|
static Alert |
unreachable() |
static Alert |
unreachable(java.lang.String msg) |
static Alert |
unreachable(java.lang.String msg,
java.lang.Throwable t)
A convenience method for building an Alert that is suitable
for signalling code regions that the programmer intends should never arise.
|
static Alert |
unreachable(java.lang.Throwable t) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public Alert()
public Alert(java.lang.String message, java.lang.Throwable cause)
message
- the main messagecause
- the originating throwablepublic Alert(java.lang.String message)
public Alert(java.lang.Throwable cause)
public java.util.Iterator<Culprit> iterator()
iterator
in interface java.lang.Iterable<Culprit>
public Culprit get(java.lang.String key)
public boolean hasKeyValue(java.lang.String k, java.lang.Object v)
public boolean hasKey(java.lang.String k)
public Alert culprit(@NonNull java.lang.String desc, java.lang.Object arg)
public Alert culprit(@NonNull java.lang.String desc, int arg)
public Alert culprit(@NonNull java.lang.String desc, char ch)
public void reportTo(java.io.PrintWriter pw)
public void report()
public java.lang.String toString()
toString
in class java.lang.Throwable
public Alert hint(@NonNull java.lang.String msg)
msg
- The message hinting as to the fix.public Alert code(@NonNull java.lang.String string)
public Alert note(@NonNull java.lang.String string)
public java.lang.String getCodeString()
public static Alert unreachable()
public static Alert unreachable(java.lang.Throwable t)
public static Alert unreachable(java.lang.String msg)
public static Alert unreachable(java.lang.String msg, java.lang.Throwable t)
msg
- The main messaget
- A wrapped throwableAlert
public static Alert unimplemented()
Alert
public static Alert unimplemented(java.lang.String msg)
msg
- the main messageAlert
public static Alert internalError()
Alert
public static Alert internalError(java.lang.String msg)
msg
- the main messageAlert