org.dellroad.stuff.java
Class CheckedExceptionWrapper

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.dellroad.stuff.java.CheckedExceptionWrapper
All Implemented Interfaces:
Serializable

public class CheckedExceptionWrapper
extends RuntimeException

Wraps checked exceptions so they can be thrown across API methods that don't declare them.

See Also:
Serialized Form

Constructor Summary
CheckedExceptionWrapper(Exception exception)
          Constructor.
 
Method Summary
 Exception getException()
          Get the wrapped exception.
 void throwException()
          Throw the wrapped exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckedExceptionWrapper

public CheckedExceptionWrapper(Exception exception)
Constructor.

Throws:
IllegalArgumentException - if exception is null
Method Detail

getException

public Exception getException()
Get the wrapped exception.


throwException

public void throwException()
                    throws Exception
Throw the wrapped exception.

Throws:
Exception