Package org.msyu.javautil.exceptions
Class AutoCloseableWrapper<X extends java.lang.Exception>
- java.lang.Object
-
- org.msyu.javautil.exceptions.AutoCloseableWrapper<X>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public final class AutoCloseableWrapper<X extends java.lang.Exception> extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description AutoCloseableWrapper(RunnableWithException<? extends X> closeAction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static <X extends java.lang.Exception>
AutoCloseableWrapper<X>runOnClose(RunnableWithException<? extends X> closeAction)
-
-
-
Constructor Detail
-
AutoCloseableWrapper
public AutoCloseableWrapper(RunnableWithException<? extends X> closeAction)
-
-
Method Detail
-
runOnClose
public static <X extends java.lang.Exception> AutoCloseableWrapper<X> runOnClose(RunnableWithException<? extends X> closeAction)
-
-