public class org.springframework.web.method.annotation.ExceptionHandlerMethodResolver
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver
super_class: java.lang.Object
{
public static final org.springframework.util.ReflectionUtils$MethodFilter EXCEPTION_HANDLER_METHODS;
descriptor: Lorg/springframework/util/ReflectionUtils$MethodFilter;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private final java.util.Map<java.lang.Class<? extends java.lang.Throwable>, java.lang.reflect.Method> mappedMethods;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/Throwable;>;Ljava/lang/reflect/Method;>;
private final java.util.Map<java.lang.Class<? extends java.lang.Throwable>, java.lang.reflect.Method> exceptionLookupCache;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/Throwable;>;Ljava/lang/reflect/Method;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokedynamic matches()Lorg/springframework/util/ReflectionUtils$MethodFilter;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/reflect/Method;)Z
org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.lambda$0(Ljava/lang/reflect/Method;)Z (6)
(Ljava/lang/reflect/Method;)Z
putstatic org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.EXCEPTION_HANDLER_METHODS:Lorg/springframework/util/ReflectionUtils$MethodFilter;
1: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.HashMap
dup
bipush 16
invokespecial java.util.HashMap.<init>:(I)V
putfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.mappedMethods:Ljava/util/Map;
2: aload 0
new org.springframework.util.ConcurrentReferenceHashMap
dup
bipush 16
invokespecial org.springframework.util.ConcurrentReferenceHashMap.<init>:(I)V
putfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.exceptionLookupCache:Ljava/util/Map;
3: aload 1
getstatic org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.EXCEPTION_HANDLER_METHODS:Lorg/springframework/util/ReflectionUtils$MethodFilter;
invokestatic org.springframework.core.MethodIntrospector.selectMethods:(Ljava/lang/Class;Lorg/springframework/util/ReflectionUtils$MethodFilter;)Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 9
StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.Class top java.util.Iterator
StackMap stack:
4: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.reflect.Method
astore 2
start local 2 5: aload 0
aload 2
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.detectExceptionMappings:(Ljava/lang/reflect/Method;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 8
StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.Class java.lang.reflect.Method java.util.Iterator top java.util.Iterator
StackMap stack:
6: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Class
astore 4
start local 4 7: aload 0
aload 4
aload 2
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.addExceptionMapping:(Ljava/lang/Class;Ljava/lang/reflect/Method;)V
end local 4 8: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
end local 2 9: StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.Class top java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
10: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 11 1 handlerType Ljava/lang/Class<*>;
5 9 2 method Ljava/lang/reflect/Method;
7 8 4 exceptionType Ljava/lang/Class<+Ljava/lang/Throwable;>;
Signature: (Ljava/lang/Class<*>;)V
MethodParameters:
Name Flags
handlerType
private java.util.List<java.lang.Class<? extends java.lang.Throwable>> detectExceptionMappings(java.lang.reflect.Method);
descriptor: (Ljava/lang/reflect/Method;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 1: aload 0
aload 1
aload 2
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.detectAnnotationExceptionMappings:(Ljava/lang/reflect/Method;Ljava/util/List;)V
2: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 9
3: aload 1
invokevirtual java.lang.reflect.Method.getParameterTypes:()[Ljava/lang/Class;
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 8
StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.reflect.Method java.util.List top int int java.lang.Class[]
StackMap stack:
4: aload 6
iload 4
aaload
astore 3
start local 3 5: ldc Ljava/lang/Throwable;
aload 3
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 7
6: aload 2
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 7: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
8: iload 4
iload 5
if_icmplt 4
9: StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.reflect.Method java.util.List
StackMap stack:
aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 11
10: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "No exception types mapped to "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 12 1 method Ljava/lang/reflect/Method;
1 12 2 result Ljava/util/List<Ljava/lang/Class<+Ljava/lang/Throwable;>;>;
5 7 3 paramType Ljava/lang/Class<*>;
Signature: (Ljava/lang/reflect/Method;)Ljava/util/List<Ljava/lang/Class<+Ljava/lang/Throwable;>;>;
MethodParameters:
Name Flags
method
private void detectAnnotationExceptionMappings(java.lang.reflect.Method, java.util.List<java.lang.Class<? extends java.lang.Throwable>>);
descriptor: (Ljava/lang/reflect/Method;Ljava/util/List;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ldc Lorg/springframework/web/bind/annotation/ExceptionHandler;
invokestatic org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation:(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
checkcast org.springframework.web.bind.annotation.ExceptionHandler
astore 3
start local 3 1: aload 3
ifnull 2
iconst_1
goto 3
StackMap locals: org.springframework.web.bind.annotation.ExceptionHandler
StackMap stack:
2: iconst_0
StackMap locals:
StackMap stack: int
3: ldc "No ExceptionHandler annotation"
invokestatic org.springframework.util.Assert.state:(ZLjava/lang/String;)V
4: aload 2
aload 3
invokeinterface org.springframework.web.bind.annotation.ExceptionHandler.value:()[Ljava/lang/Class;
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 6 1 method Ljava/lang/reflect/Method;
0 6 2 result Ljava/util/List<Ljava/lang/Class<+Ljava/lang/Throwable;>;>;
1 6 3 ann Lorg/springframework/web/bind/annotation/ExceptionHandler;
Signature: (Ljava/lang/reflect/Method;Ljava/util/List<Ljava/lang/Class<+Ljava/lang/Throwable;>;>;)V
MethodParameters:
Name Flags
method
result
private void addExceptionMapping(java.lang.Class<? extends java.lang.Throwable>, java.lang.reflect.Method);
descriptor: (Ljava/lang/Class;Ljava/lang/reflect/Method;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.mappedMethods:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.reflect.Method
astore 3
start local 3 1: aload 3
ifnull 5
aload 3
aload 2
invokevirtual java.lang.reflect.Method.equals:(Ljava/lang/Object;)Z
ifne 5
2: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Ambiguous @ExceptionHandler method mapped for ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
3: aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "]: {"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ", "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "}"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: java.lang.reflect.Method
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 6 1 exceptionType Ljava/lang/Class<+Ljava/lang/Throwable;>;
0 6 2 method Ljava/lang/reflect/Method;
1 6 3 oldMethod Ljava/lang/reflect/Method;
Signature: (Ljava/lang/Class<+Ljava/lang/Throwable;>;Ljava/lang/reflect/Method;)V
MethodParameters:
Name Flags
exceptionType
method
public boolean hasExceptionMappings();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.mappedMethods:Ljava/util/Map;
invokeinterface java.util.Map.isEmpty:()Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
public java.lang.reflect.Method resolveMethod(java.lang.Exception);
descriptor: (Ljava/lang/Exception;)Ljava/lang/reflect/Method;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.resolveMethodByThrowable:(Ljava/lang/Throwable;)Ljava/lang/reflect/Method;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 1 1 exception Ljava/lang/Exception;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
exception
public java.lang.reflect.Method resolveMethodByThrowable(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)Ljava/lang/reflect/Method;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.resolveMethodByExceptionType:(Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 2
start local 2 1: aload 2
ifnonnull 5
2: aload 1
invokevirtual java.lang.Throwable.getCause:()Ljava/lang/Throwable;
astore 3
start local 3 3: aload 3
ifnull 5
4: aload 0
aload 3
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.resolveMethodByExceptionType:(Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 2
end local 3 5: StackMap locals: java.lang.reflect.Method
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 6 1 exception Ljava/lang/Throwable;
1 6 2 method Ljava/lang/reflect/Method;
3 5 3 cause Ljava/lang/Throwable;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
exception
public java.lang.reflect.Method resolveMethodByExceptionType(java.lang.Class<? extends java.lang.Throwable>);
descriptor: (Ljava/lang/Class;)Ljava/lang/reflect/Method;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.exceptionLookupCache:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.reflect.Method
astore 2
start local 2 1: aload 2
ifnonnull 4
2: aload 0
aload 1
invokevirtual org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.getMappedMethod:(Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 2
3: aload 0
getfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.exceptionLookupCache:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: StackMap locals: java.lang.reflect.Method
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 5 1 exceptionType Ljava/lang/Class<+Ljava/lang/Throwable;>;
1 5 2 method Ljava/lang/reflect/Method;
Signature: (Ljava/lang/Class<+Ljava/lang/Throwable;>;)Ljava/lang/reflect/Method;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
exceptionType
private java.lang.reflect.Method getMappedMethod(java.lang.Class<? extends java.lang.Throwable>);
descriptor: (Ljava/lang/Class;)Ljava/lang/reflect/Method;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 1: aload 0
getfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.mappedMethods:Ljava/util/Map;
invokeinterface java.util.Map.keySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 4
goto 5
StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.Class java.util.List top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Class
astore 3
start local 3 3: aload 3
aload 1
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 5
4: aload 2
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 5: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
6: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifne 9
7: aload 2
new org.springframework.core.ExceptionDepthComparator
dup
aload 1
invokespecial org.springframework.core.ExceptionDepthComparator.<init>:(Ljava/lang/Class;)V
invokeinterface java.util.List.sort:(Ljava/util/Comparator;)V
8: aload 0
getfield org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.mappedMethods:Ljava/util/Map;
aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.reflect.Method
areturn
9: StackMap locals: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver java.lang.Class java.util.List
StackMap stack:
aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/springframework/web/method/annotation/ExceptionHandlerMethodResolver;
0 10 1 exceptionType Ljava/lang/Class<+Ljava/lang/Throwable;>;
1 10 2 matches Ljava/util/List<Ljava/lang/Class<+Ljava/lang/Throwable;>;>;
3 5 3 mappedException Ljava/lang/Class<+Ljava/lang/Throwable;>;
Signature: (Ljava/lang/Class<+Ljava/lang/Throwable;>;)Ljava/lang/reflect/Method;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
exceptionType
private static boolean lambda$0(java.lang.reflect.Method);
descriptor: (Ljava/lang/reflect/Method;)Z
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc Lorg/springframework/web/bind/annotation/ExceptionHandler;
invokestatic org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation:(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 method Ljava/lang/reflect/Method;
}
SourceFile: "ExceptionHandlerMethodResolver.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract MethodFilter = org.springframework.util.ReflectionUtils$MethodFilter of org.springframework.util.ReflectionUtils