Package bridge
Class Unchecked
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
bridge.Unchecked
- All Implemented Interfaces:
Serializable
A class for interacting with unchecked exceptions
- See Also:
- Notes:
- The constructor for this class does not actually construct anything – so, the imaginary object must be immediately thrown for your code to compile correctly.
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Unchecked
Allows any type of exception to become unchecked- Parameters:
e
- Exception
-
-
Method Details
-
check
Brings an (unchecked) exception into scope- Type Parameters:
E
- Exception type- Throws:
E extends Throwable
-