public abstract class ContextHandler<C extends ExecutionNotifier<?>> extends Object
ExecutionNotifier
to handle execution conditions.Modifier | Constructor and Description |
---|---|
protected |
ContextHandler(C context)
Creates a new ContextHandler instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doFor(String context,
Runnable action)
Performs the given action within the specified context.
|
C |
getContext()
Returns the execution context for this reporter.
|
Notifier |
getNotifier()
Returns the condition notifier for this reporter.
|
protected void |
notifyError(String[] location,
String reason,
String resolution)
Reports an error condition at the given location.
|
protected void |
notifyError(String reason,
String resolution)
Reports an error condition
|
protected void |
notifyWarning(String reason)
Reports a warning condition
|
protected void |
notifyWarning(String[] location,
String reason)
Reports a warning condition at the given location.
|
protected <T> T |
resultFor(String context,
Supplier<T> supplier)
Returns the result of the given supplier within the specified context.
|
void |
setNotifier(Notifier notifier)
Changes the condition notifier for this reporter.
|
protected ContextHandler(C context)
public void setNotifier(Notifier notifier)
public Notifier getNotifier()
public C getContext()
protected void notifyWarning(String reason)
protected void notifyWarning(String[] location, String reason)
protected void notifyError(String[] location, String reason, String resolution)
protected <T> T resultFor(String context, Supplier<T> supplier)
Copyright © 2024 The Cornutum Project. All rights reserved.