C
- the type of the cause exceptions.X
- the type of the assembled exceptions.@NotThreadSafe public class SequentialIOExceptionBuilder<C extends Exception,X extends SequentialIOException> extends AbstractExceptionBuilder<C,X>
SequentialIOException
from one or more
Exception
s by
chaining
them.
When the assembly is thrown or returned later, it is sorted by
priority
.Constructor and Description |
---|
SequentialIOExceptionBuilder(Class<C> c,
Class<X> x) |
Modifier and Type | Method and Description |
---|---|
static SequentialIOExceptionBuilder<Exception,SequentialIOException> |
create()
Static constructor provided for comforting the most essential use case.
|
static <C extends Exception> |
create(Class<C> clazz) |
static <C extends Exception,X extends SequentialIOException> |
create(Class<C> cause,
Class<X> assembly) |
protected X |
post(X assembly)
This method is called to post-process the given result of the assembly
after it has been checked out.
|
protected X |
update(C cause,
X previous)
Chains the given exceptions and returns the result.
|
check, fail, warn
public static SequentialIOExceptionBuilder<Exception,SequentialIOException> create()
public static <C extends Exception> SequentialIOExceptionBuilder<C,SequentialIOException> create(Class<C> clazz)
public static <C extends Exception,X extends SequentialIOException> SequentialIOExceptionBuilder<C,X> create(Class<C> cause, Class<X> assembly)
protected final X post(X assembly)
The implementation in the class AbstractExceptionBuilder
simply
returns the parameter.
Sorts the given exception chain by
priority
and returns the result.
post
in class AbstractExceptionBuilder<C extends Exception,X extends SequentialIOException>
assembly
- The checked out result of the exception assembly.protected final X update(C cause, X previous)
update
in class AbstractExceptionBuilder<C extends Exception,X extends SequentialIOException>
cause
- A(nother) cause exception to add to the assembly.previous
- The previous result of the assembly or null
if
this is the first call since the creation of this instance or the
last assembly has been checked out.null
is not permitted.IllegalStateException
- if
cause.
SequentialIOException.getPredecessor()
is
already initialized by a previous call to
SequentialIOException.initPredecessor(SequentialIOException)
.Copyright © 2005–2013 Schlichtherle IT Services. All rights reserved.