Class IOExceptionList

    • Constructor Detail

      • IOExceptionList

        public IOExceptionList​(List<? extends Throwable> causeList)
        Creates a new exception caused by a list of exceptions.
        Parameters:
        causeList - a list of cause exceptions.
    • Method Detail

      • getCauseList

        public <T extends ThrowableList<T> getCauseList()
        Gets the cause list.
        Type Parameters:
        T - type of exception to return.
        Returns:
        The list of causes.
      • getCause

        public <T extends Throwable> T getCause​(int index)
        Gets the cause exception at the given index.
        Type Parameters:
        T - type of exception to return.
        Parameters:
        index - index in the cause list.
        Returns:
        The list of causes.
      • getCause

        public <T extends Throwable> T getCause​(int index,
                                                Class<T> clazz)
        Gets the cause exception at the given index.
        Type Parameters:
        T - type of exception to return.
        Parameters:
        index - index in the cause list.
        clazz - type of exception to return.
        Returns:
        The list of causes.
      • getCauseList

        public <T extends ThrowableList<T> getCauseList​(Class<T> clazz)
        Works around Throwable and Generics, may fail at runtime depending on the argument value.
        Type Parameters:
        T - type of exception to return.
        Parameters:
        clazz - the target type
        Returns:
        The list of causes.