public class UncheckedExceptions extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
UncheckedExceptions.UncheckedFunction<R> |
|
static interface |
UncheckedExceptions.UncheckedMethod |
| Constructor | Description |
|---|---|
UncheckedExceptions() |
| Modifier and Type | Method | Description |
|---|---|---|
static <T extends Throwable> |
unchecked(Exception exception) |
throws
exception as unchecked exception, without wrapping exception. |
static <R> R |
unchecked(UncheckedExceptions.UncheckedFunction<R> function) |
Executes given function,
catches and rethrows checked exceptions as unchecked exceptions, without wrapping exception.
|
static void |
unchecked(UncheckedExceptions.UncheckedMethod method) |
Executes given method,
catches and rethrows checked exceptions as unchecked exceptions, without wrapping exception.
|
public static <T extends Throwable> T unchecked(Exception exception) throws T extends Throwable
exception as unchecked exception, without wrapping exception.exception only to be able to write throw unchecked(exception)T - exception as unchecked exceptionT extends Throwablepublic static <R> R unchecked(UncheckedExceptions.UncheckedFunction<R> function)
unchecked(Exception)public static void unchecked(UncheckedExceptions.UncheckedMethod method)
unchecked(Exception)Copyright © 2018. All rights reserved.