public class DelayedError extends Object
Binder.addError(String, Object...), but can be canceled later. Useful for enforcing correct usage
of fluent APIs.| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel this error.
|
static DelayedError |
create(Binder binder,
Message message)
Create a
DelayedError. |
static DelayedError |
create(Binder binder,
String message,
Object... args)
Create a
DelayedError. |
static DelayedError |
create(Binder binder,
Throwable t)
Create a
DelayedError. |
public static DelayedError create(Binder binder, String message, Object... args)
DelayedError.binder - The binder to attach the error to.message - The format string for the message.args - Arguments that will be passed to the format string.DelayedError token that can be canceled later.Binder.addError(String, Object...)public static DelayedError create(Binder binder, Throwable t)
DelayedError.binder - The binder to attach the error to.t - The Throwable that caused this potential error.DelayedError token that can be canceled later.Binder.addError(Throwable)public static DelayedError create(Binder binder, Message message)
DelayedError.binder - The binder to attach the error to.message - The error message.DelayedError token that can be canceled later.Binder.addError(Message)public void cancel()
Copyright © 2014–2015. All rights reserved.