public class AnnotationExceptionHandlerMethodResolver extends AbstractExceptionHandlerMethodResolver
AbstractExceptionHandlerMethodResolver that looks for
MessageExceptionHandler-annotated methods in a given class. The actual
exception types handled are extracted either from the annotation, if present,
or from the method signature as a fallback option.| Modifier and Type | Field and Description |
|---|---|
static ReflectionUtils.MethodFilter |
EXCEPTION_HANDLER_METHOD_FILTER
A filter for selecting annotated exception handling methods.
|
| Constructor and Description |
|---|
AnnotationExceptionHandlerMethodResolver(java.lang.Class<?> handlerType)
A constructor that finds
MessageExceptionHandler methods in the given type. |
| Modifier and Type | Method and Description |
|---|---|
private static java.util.List<java.lang.Class<? extends java.lang.Throwable>> |
getMappedExceptions(java.lang.reflect.Method method) |
private static java.util.Map<java.lang.Class<? extends java.lang.Throwable>,java.lang.reflect.Method> |
initExceptionMappings(java.lang.Class<?> handlerType) |
getExceptionsFromMethodSignature, hasExceptionMappings, resolveMethodpublic static final ReflectionUtils.MethodFilter EXCEPTION_HANDLER_METHOD_FILTER
public AnnotationExceptionHandlerMethodResolver(java.lang.Class<?> handlerType)
MessageExceptionHandler methods in the given type.handlerType - the type to introspectprivate static java.util.Map<java.lang.Class<? extends java.lang.Throwable>,java.lang.reflect.Method> initExceptionMappings(java.lang.Class<?> handlerType)
private static java.util.List<java.lang.Class<? extends java.lang.Throwable>> getMappedExceptions(java.lang.reflect.Method method)