public class implements org.springframework.web.server.i18n.LocaleContextResolver
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver
super_class: java.lang.Object
{
private final java.util.List<java.util.Locale> ;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljava/util/Locale;>;
private java.util.Locale ;
descriptor: Ljava/util/Locale;
flags: (0x0002) ACC_PRIVATE
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
public void ();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.ArrayList
dup
iconst_4
invokespecial java.util.ArrayList.<init>:(I)V
putfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.supportedLocales:Ljava/util/List;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
public void setSupportedLocales(java.util.List<java.util.Locale>);
descriptor: (Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.supportedLocales:Ljava/util/List;
invokeinterface java.util.List.clear:()V
1: aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.supportedLocales:Ljava/util/List;
aload 1
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
0 3 1 locales Ljava/util/List<Ljava/util/Locale;>;
Signature: (Ljava/util/List<Ljava/util/Locale;>;)V
MethodParameters:
Name Flags
locales
public java.util.List<java.util.Locale> getSupportedLocales();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.supportedLocales:Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
Signature: ()Ljava/util/List<Ljava/util/Locale;>;
public void (java.util.Locale);
descriptor: (Ljava/util/Locale;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.defaultLocale:Ljava/util/Locale;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
0 2 1 defaultLocale Ljava/util/Locale;
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
defaultLocale
public java.util.Locale ();
descriptor: ()Ljava/util/Locale;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.defaultLocale:Ljava/util/Locale;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
public org.springframework.context.i18n.LocaleContext (org.springframework.web.server.ServerWebExchange);
descriptor: (Lorg/springframework/web/server/ServerWebExchange;)Lorg/springframework/context/i18n/LocaleContext;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 1
invokeinterface org.springframework.web.server.ServerWebExchange.getRequest:()Lorg/springframework/http/server/reactive/ServerHttpRequest;
invokeinterface org.springframework.http.server.reactive.ServerHttpRequest.getHeaders:()Lorg/springframework/http/HttpHeaders;
invokevirtual org.springframework.http.HttpHeaders.getAcceptLanguageAsLocales:()Ljava/util/List;
astore 2
2: goto 4
3: StackMap locals: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver org.springframework.web.server.ServerWebExchange java.util.List
StackMap stack: java.lang.IllegalArgumentException
pop
4: StackMap locals:
StackMap stack:
new org.springframework.context.i18n.SimpleLocaleContext
dup
aload 0
aload 2
invokevirtual org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.resolveSupportedLocale:(Ljava/util/List;)Ljava/util/Locale;
invokespecial org.springframework.context.i18n.SimpleLocaleContext.<init>:(Ljava/util/Locale;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
0 5 1 exchange Lorg/springframework/web/server/ServerWebExchange;
1 5 2 requestLocales Ljava/util/List<Ljava/util/Locale;>;
Exception table:
from to target type
1 2 3 Class java.lang.IllegalArgumentException
MethodParameters:
Name Flags
exchange
private java.util.Locale resolveSupportedLocale(java.util.List<java.util.Locale>);
descriptor: (Ljava/util/List;)Ljava/util/Locale;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=8, args_size=2
start local 0 start local 1 0: aload 1
invokestatic org.springframework.util.CollectionUtils.isEmpty:(Ljava/util/Collection;)Z
ifeq 2
1: aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.defaultLocale:Ljava/util/Locale;
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.getSupportedLocales:()Ljava/util/List;
astore 2
start local 2 3: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 5
4: aload 1
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.util.Locale
areturn
5: StackMap locals: java.util.List
StackMap stack:
aconst_null
astore 3
start local 3 6: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 19
StackMap locals: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver java.util.List java.util.List java.util.Locale top java.util.Iterator
StackMap stack:
7: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Locale
astore 4
start local 4 8: aload 2
aload 4
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
ifeq 11
9: aload 3
ifnull 10
aload 3
invokevirtual java.util.Locale.getLanguage:()Ljava/lang/String;
aload 4
invokevirtual java.util.Locale.getLanguage:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 19
10: StackMap locals: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver java.util.List java.util.List java.util.Locale java.util.Locale java.util.Iterator
StackMap stack:
aload 4
areturn
11: StackMap locals:
StackMap stack:
aload 3
ifnonnull 19
12: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 18
StackMap locals: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver java.util.List java.util.List java.util.Locale java.util.Locale java.util.Iterator top java.util.Iterator
StackMap stack:
13: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Locale
astore 6
start local 6 14: aload 6
invokevirtual java.util.Locale.getCountry:()Ljava/lang/String;
invokestatic org.springframework.util.StringUtils.hasLength:(Ljava/lang/String;)Z
ifne 18
15: aload 6
invokevirtual java.util.Locale.getLanguage:()Ljava/lang/String;
aload 4
invokevirtual java.util.Locale.getLanguage:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 18
16: aload 6
astore 3
17: goto 19
end local 6 18: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 13
end local 4 19: StackMap locals: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver java.util.List java.util.List java.util.Locale top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
20: aload 3
ifnull 22
21: aload 3
areturn
22: StackMap locals: org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver java.util.List java.util.List java.util.Locale
StackMap stack:
aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.defaultLocale:Ljava/util/Locale;
ifnull 23
aload 0
getfield org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver.defaultLocale:Ljava/util/Locale;
goto 24
StackMap locals:
StackMap stack:
23: aload 1
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.util.Locale
StackMap locals:
StackMap stack: java.util.Locale
24: areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
0 25 1 requestLocales Ljava/util/List<Ljava/util/Locale;>;
3 25 2 supportedLocales Ljava/util/List<Ljava/util/Locale;>;
6 25 3 languageMatch Ljava/util/Locale;
8 19 4 locale Ljava/util/Locale;
14 18 6 candidate Ljava/util/Locale;
Signature: (Ljava/util/List<Ljava/util/Locale;>;)Ljava/util/Locale;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
requestLocales
public void (org.springframework.web.server.ServerWebExchange, org.springframework.context.i18n.LocaleContext);
descriptor: (Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/context/i18n/LocaleContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.UnsupportedOperationException
dup
1: ldc "Cannot change HTTP accept header - use a different locale context resolution strategy"
2: invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/web/server/i18n/AcceptHeaderLocaleContextResolver;
0 3 1 exchange Lorg/springframework/web/server/ServerWebExchange;
0 3 2 locale Lorg/springframework/context/i18n/LocaleContext;
RuntimeVisibleParameterAnnotations:
0:
1:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
exchange
locale
}
SourceFile: "AcceptHeaderLocaleContextResolver.java"