public class IOExceptionList
extends java.io.IOException
implements java.lang.Iterable<java.lang.Throwable>
The first exception in the list is used as this exception's cause and is accessible with the usual
Throwable.getCause() while the complete list is accessible with getCauseList().
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<? extends java.lang.Throwable> |
causeList |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
IOExceptionList(java.util.List<? extends java.lang.Throwable> causeList)
Constructs a new exception caused by a list of exceptions.
|
IOExceptionList(java.lang.String message,
java.util.List<? extends java.lang.Throwable> causeList)
Constructs a new exception caused by a list of exceptions.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
checkEmpty(java.util.List<? extends java.lang.Throwable> causeList,
java.lang.Object message)
Throws this exception if the list is not null or empty.
|
<T extends java.lang.Throwable> |
getCause(int index)
Gets the cause exception at the given index.
|
<T extends java.lang.Throwable> |
getCause(int index,
java.lang.Class<T> clazz)
Gets the cause exception at the given index.
|
<T extends java.lang.Throwable> |
getCauseList()
Gets the cause list.
|
<T extends java.lang.Throwable> |
getCauseList(java.lang.Class<T> clazz)
Works around Throwable and Generics, may fail at runtime depending on the argument value.
|
private static boolean |
isEmpty(java.util.List<? extends java.lang.Throwable> causeList) |
java.util.Iterator<java.lang.Throwable> |
iterator() |
private static int |
size(java.util.List<? extends java.lang.Throwable> causeList) |
private static java.lang.String |
toMessage(java.util.List<? extends java.lang.Throwable> causeList) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprivate static final long serialVersionUID
private final java.util.List<? extends java.lang.Throwable> causeList
public IOExceptionList(java.util.List<? extends java.lang.Throwable> causeList)
causeList - a list of cause exceptions.public IOExceptionList(java.lang.String message,
java.util.List<? extends java.lang.Throwable> causeList)
message - The detail message, see Throwable.getMessage().causeList - a list of cause exceptions.public static void checkEmpty(java.util.List<? extends java.lang.Throwable> causeList,
java.lang.Object message)
throws IOExceptionList
causeList - The list to test.message - The detail message, see Throwable.getMessage().IOExceptionList - if the list is not null or empty.private static boolean isEmpty(java.util.List<? extends java.lang.Throwable> causeList)
private static int size(java.util.List<? extends java.lang.Throwable> causeList)
private static java.lang.String toMessage(java.util.List<? extends java.lang.Throwable> causeList)
public <T extends java.lang.Throwable> T getCause(int index)
T - type of exception to return.index - index in the cause list.public <T extends java.lang.Throwable> T getCause(int index,
java.lang.Class<T> clazz)
T - type of exception to return.index - index in the cause list.clazz - type of exception to return.public <T extends java.lang.Throwable> java.util.List<T> getCauseList()
T - type of exception to return.public <T extends java.lang.Throwable> java.util.List<T> getCauseList(java.lang.Class<T> clazz)
T - type of exception to return.clazz - the target typepublic java.util.Iterator<java.lang.Throwable> iterator()
iterator in interface java.lang.Iterable<java.lang.Throwable>