Interface Checked.AutoCloseable<E extends Exception>
- All Superinterfaces:
- All Known Implementing Classes:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface Checked.AutoCloseable<E extends Exception> extends AutoCloseableVersion of
AutoCloseablewith an exception-type parameter.
This does not need
ederWrapmethods because Java's
AutoCloseablealready allows checked exceptions. The only trouble with the Java one is it can't be parameterized to narrow the thrown type from
Exception. In Java's API docs, implementers are "strongly encouraged" to narrow their
throwsclauses, but that's only helpful where the compiler sees the specific implementing class.
Modifier and Type Method Description