lp.util
Class ExceptionAdapter

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by lp.util.ExceptionAdapter
All Implemented Interfaces:
Serializable

public class ExceptionAdapter
extends RuntimeException

A RuntimeException container for checked exceptions. Should be used fake the checked exception mechanism in Java. See this article for some arguments why this could be a good idea ;o)

Version:
1.0.0
Author:
Martin Slota
See Also:
Serialized Form

Constructor Summary
ExceptionAdapter(Exception cause)
          Creates a new instance of ExceptionAdapter that stores cause as its cause.
 
Method Summary
 void rethrow()
          Rethrows the original 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

ExceptionAdapter

public ExceptionAdapter(Exception cause)
Creates a new instance of ExceptionAdapter that stores cause as its cause.

Parameters:
cause - the exception to wrap
Method Detail

rethrow

public void rethrow()
             throws Exception
Rethrows the original exception.

Throws:
Exception - the original exception