All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.kludje.fn.lang.URunnable Maven / Gradle / Ivy

There is a newer version: 0.8
Show newest version
/*Generated file; do not edit*/
package uk.kludje.fn.lang;

/**
 * A functional interface for handling checked exceptions.
 * See parent type for intent.
 */
@java.lang.FunctionalInterface
@javax.annotation.Generated("uk.kludje.annotation.processor.UncheckedFunctionalInterfaceProcessor")
public interface URunnable extends java.lang.Runnable {

      /**
       * Invokes {@code void $run()}.
       * Throws anything thrown by {@code void $run()}.
       */
       default void run() {
        try {
          $run();
        } catch (Throwable throwable) {
          throw uk.kludje.Exceptions.throwChecked(throwable);
        }
      }

      void $run() throws Throwable;

      /**
       * Convenience method as an alternative to casting.
       *
       * @param t the unchecked type
       * @return t
       */
      public static  URunnable asURunnable(URunnable t) {
        return t;
      }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy