|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.prim.Thrower
Safe: An StaticMaker on this class is the function named "throw" in the universalScope (and therefore also in the safeScope).
Field Summary | |
static Thrower |
THE_ONE
Enabled: |
Constructor Summary | |
private |
Thrower()
|
Method Summary | |
void |
__printOn(TextWriter out)
Enabled: Prints as "throw", the name by which it's known in the universalScope. |
void |
breakpoint(Object diagnostic)
Enabled: Just something callable from E to breakpoint on in Java. |
void |
eject(OneArgFunc optEjector,
RuntimeException problem)
Enabled: Exits according to optEjector with the provided value, for use from E. |
void |
run(RuntimeException problem)
Enabled: Throws problem (coerced to a RuntimeException). |
static RuntimeException |
toEject(OneArgFunc optEjector,
Object prob)
Enabled: Exits according to optEjector with the provided value, for use from Java. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Thrower THE_ONE
Constructor Detail |
private Thrower()
Method Detail |
public void run(RuntimeException problem)
public void eject(OneArgFunc optEjector, RuntimeException problem)
If optEjector is null, then throws 'value' as a throwable problem that doesn't need to be declared. Otherwise, optEjector should eject rather than returning. If it does return, then 'eject' does its own (backtraced) throw rather than returning.
public static RuntimeException toEject(OneArgFunc optEjector, Object prob)
If optEjector is null, then returns 'value' as a throwable problem that doesn't need to be declared. Otherwise, optEjector should eject rather than returning. If it does return, then 'toEject' does its own (backtraced) throw rather than returning.
The caller should typically say
throw Thrower.toEject(optEjector, problem);One of the reasons why 'toEject' has its caller do a throw is to provide the Java compiler with better control flow information.
public void breakpoint(Object diagnostic)
public void __printOn(TextWriter out) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |