public abstract class ExecutionContext<E extends RuntimeException> extends Object
| Constructor and Description |
|---|
ExecutionContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
doFor(String context,
Runnable action)
Performs the given action within the specified context.
|
String[] |
getLocation()
Returns the path to the current context.
|
<T> T |
resultFor(String context,
Supplier<T> supplier)
Returns the result of the given supplier within the specified context.
|
String |
toString() |
protected abstract E |
whenFailure(Exception e)
Returns an exception to throw for the given failure.
|
public <T> T resultFor(String context, Supplier<T> supplier)
public void doFor(String context, Runnable action)
protected abstract E whenFailure(Exception e)
public String[] getLocation()
Copyright © 2020 The Cornutum Project. All rights reserved.