Package com.mscharhag.et.impl
Class ReflectiveExceptionResolver
java.lang.Object
com.mscharhag.et.impl.ReflectiveExceptionResolver
- All Implemented Interfaces:
TargetExceptionResolver
Returns
RuntimeException instances based on a passed Class.-
Constructor Summary
ConstructorsConstructorDescriptionReflectiveExceptionResolver(Class<? extends RuntimeException> targetExceptionClass) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<com.mscharhag.et.impl.ReflectiveExceptionResolver.ConstructorArgumentMapping>getConstructorMappings(Exception source) getTargetException(String message, Exception sourceException) Translates the passed exception to aRuntimeException.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mscharhag.et.TargetExceptionResolver
getTargetException
-
Constructor Details
-
ReflectiveExceptionResolver
ReflectiveExceptionResolver(Class<? extends RuntimeException> targetExceptionClass)
-
-
Method Details
-
getTargetException
Description copied from interface:TargetExceptionResolverTranslates the passed exception to aRuntimeException. If, for some reason, no target exception can be returned, aTranslationExceptionshould be thrown.- Specified by:
getTargetExceptionin interfaceTargetExceptionResolver- Returns:
- a
RuntimeException, nevernull
-
getConstructorMappings
-