public class Throws extends Object
| 构造器和说明 |
|---|
Throws() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Throwable,R> |
sneakyThrow(Throwable t)
Java 8 Type-Inference, Which simply means that every T in “T extends Throwable” is generously
inferred to be a RuntimeException if an inference of a more concrete type is not possible.
|
public static <T extends Throwable,R> R sneakyThrow(Throwable t) throws T extends Throwable
T - Subclass of ExceptionR - Return typet - ExceptionT - RuntimeExceptionT extends ThrowableCopyright © 2018. All rights reserved.