public class org.springframework.boot.util.Instantiator<T>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.springframework.boot.util.Instantiator
super_class: java.lang.Object
{
private static final java.util.Comparator<java.lang.reflect.Constructor<?>> CONSTRUCTOR_COMPARATOR;
descriptor: Ljava/util/Comparator;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Comparator<Ljava/lang/reflect/Constructor<*>;>;
private final java.lang.Class<?> type;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<*>;
private final java.util.Map<java.lang.Class<?>, java.util.function.Function<java.lang.Class<?>, java.lang.Object>> availableParameters;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Class<*>;Ljava/util/function/Function<Ljava/lang/Class<*>;Ljava/lang/Object;>;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokedynamic applyAsInt()Ljava/util/function/ToIntFunction;
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/Object;)I
java/lang/reflect/Constructor.getParameterCount()I (5)
(Ljava/lang/reflect/Constructor;)I
invokestatic java.util.Comparator.comparingInt:(Ljava/util/function/ToIntFunction;)Ljava/util/Comparator;
invokeinterface java.util.Comparator.reversed:()Ljava/util/Comparator;
1: putstatic org.springframework.boot.util.Instantiator.CONSTRUCTOR_COMPARATOR:Ljava/util/Comparator;
2: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.Class<?>, java.util.function.Consumer<org.springframework.boot.util.Instantiator$AvailableParameters>);
descriptor: (Ljava/lang/Class;Ljava/util/function/Consumer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.springframework.boot.util.Instantiator.type:Ljava/lang/Class;
2: aload 0
aload 0
aload 2
invokevirtual org.springframework.boot.util.Instantiator.getAvailableParameters:(Ljava/util/function/Consumer;)Ljava/util/Map;
putfield org.springframework.boot.util.Instantiator.availableParameters:Ljava/util/Map;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 4 1 type Ljava/lang/Class<*>;
0 4 2 availableParameters Ljava/util/function/Consumer<Lorg/springframework/boot/util/Instantiator$AvailableParameters;>;
Signature: (Ljava/lang/Class<*>;Ljava/util/function/Consumer<Lorg/springframework/boot/util/Instantiator$AvailableParameters;>;)V
MethodParameters:
Name Flags
type
availableParameters
private java.util.Map<java.lang.Class<?>, java.util.function.Function<java.lang.Class<?>, java.lang.Object>> getAvailableParameters(java.util.function.Consumer<org.springframework.boot.util.Instantiator$AvailableParameters>);
descriptor: (Ljava/util/function/Consumer;)Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: new java.util.LinkedHashMap
dup
invokespecial java.util.LinkedHashMap.<init>:()V
astore 2
start local 2 1: aload 1
new org.springframework.boot.util.Instantiator$1
dup
aload 0
aload 2
invokespecial org.springframework.boot.util.Instantiator$1.<init>:(Lorg/springframework/boot/util/Instantiator;Ljava/util/Map;)V
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
2: aload 2
invokestatic java.util.Collections.unmodifiableMap:(Ljava/util/Map;)Ljava/util/Map;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 3 1 availableParameters Ljava/util/function/Consumer<Lorg/springframework/boot/util/Instantiator$AvailableParameters;>;
1 3 2 result Ljava/util/Map<Ljava/lang/Class<*>;Ljava/util/function/Function<Ljava/lang/Class<*>;Ljava/lang/Object;>;>;
Signature: (Ljava/util/function/Consumer<Lorg/springframework/boot/util/Instantiator$AvailableParameters;>;)Ljava/util/Map<Ljava/lang/Class<*>;Ljava/util/function/Function<Ljava/lang/Class<*>;Ljava/lang/Object;>;>;
MethodParameters:
Name Flags
availableParameters
public java.util.List<T> instantiate(java.util.Collection<java.lang.String>);
descriptor: (Ljava/util/Collection;)Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
aload 1
invokeinterface java.util.Collection.size:()I
invokespecial java.util.ArrayList.<init>:(I)V
astore 2
start local 2 1: aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 4
goto 4
StackMap locals: org.springframework.boot.util.Instantiator java.util.Collection java.util.List top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 3
start local 3 3: aload 2
aload 0
aload 3
invokevirtual org.springframework.boot.util.Instantiator.instantiate:(Ljava/lang/String;)Ljava/lang/Object;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 4: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 2
invokestatic org.springframework.core.annotation.AnnotationAwareOrderComparator.sort:(Ljava/util/List;)V
6: aload 2
invokestatic java.util.Collections.unmodifiableList:(Ljava/util/List;)Ljava/util/List;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 7 1 names Ljava/util/Collection<Ljava/lang/String;>;
1 7 2 instances Ljava/util/List<TT;>;
3 4 3 name Ljava/lang/String;
Signature: (Ljava/util/Collection<Ljava/lang/String;>;)Ljava/util/List<TT;>;
MethodParameters:
Name Flags
names
private T instantiate(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
aconst_null
invokestatic org.springframework.util.ClassUtils.forName:(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;
astore 2
start local 2 1: aload 0
getfield org.springframework.boot.util.Instantiator.type:Ljava/lang/Class;
aload 2
invokestatic org.springframework.util.Assert.isAssignable:(Ljava/lang/Class;Ljava/lang/Class;)V
2: aload 0
aload 2
invokevirtual org.springframework.boot.util.Instantiator.instantiate:(Ljava/lang/Class;)Ljava/lang/Object;
3: areturn
end local 2 4: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
start local 2 5: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Unable to instantiate "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.springframework.boot.util.Instantiator.type:Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " ["
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 2
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 6 1 name Ljava/lang/String;
1 4 2 type Ljava/lang/Class<*>;
5 6 2 ex Ljava/lang/Throwable;
Exception table:
from to target type
0 3 4 Class java.lang.Throwable
Signature: (Ljava/lang/String;)TT;
MethodParameters:
Name Flags
name
private T instantiate(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=8, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.Class.getDeclaredConstructors:()[Ljava/lang/reflect/Constructor;
astore 2
start local 2 1: aload 2
getstatic org.springframework.boot.util.Instantiator.CONSTRUCTOR_COMPARATOR:Ljava/util/Comparator;
invokestatic java.util.Arrays.sort:([Ljava/lang/Object;Ljava/util/Comparator;)V
2: aload 2
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 9
StackMap locals: org.springframework.boot.util.Instantiator java.lang.Class java.lang.reflect.Constructor[] top int int java.lang.reflect.Constructor[]
StackMap stack:
3: aload 6
iload 4
aaload
astore 3
start local 3 4: aload 0
aload 3
invokevirtual java.lang.reflect.Constructor.getParameterTypes:()[Ljava/lang/Class;
invokevirtual org.springframework.boot.util.Instantiator.getArgs:([Ljava/lang/Class;)[Ljava/lang/Object;
astore 7
start local 7 5: aload 7
ifnull 8
6: aload 3
invokestatic org.springframework.util.ReflectionUtils.makeAccessible:(Ljava/lang/reflect/Constructor;)V
7: aload 3
aload 7
invokevirtual java.lang.reflect.Constructor.newInstance:([Ljava/lang/Object;)Ljava/lang/Object;
areturn
end local 7 end local 3 8: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
9: iload 4
iload 5
if_icmplt 3
10: new java.lang.IllegalAccessException
dup
ldc "Unable to find suitable constructor"
invokespecial java.lang.IllegalAccessException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 11 1 type Ljava/lang/Class<*>;
1 11 2 constructors [Ljava/lang/reflect/Constructor;
4 8 3 constructor Ljava/lang/reflect/Constructor<*>;
5 8 7 args [Ljava/lang/Object;
Exceptions:
throws java.lang.Exception
Signature: (Ljava/lang/Class<*>;)TT;
MethodParameters:
Name Flags
type
private [] getArgs(java.lang.Class<?>[]);
descriptor: ([Ljava/lang/Class;)[Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 1
arraylength
anewarray java.lang.Object
astore 2
start local 2 1: iconst_0
istore 3
start local 3 2: goto 8
3: StackMap locals: java.lang.Object[] int
StackMap stack:
aload 0
aload 1
iload 3
aaload
invokevirtual org.springframework.boot.util.Instantiator.getAvailableParameter:(Ljava/lang/Class;)Ljava/util/function/Function;
astore 4
start local 4 4: aload 4
ifnonnull 6
5: aconst_null
areturn
6: StackMap locals: java.util.function.Function
StackMap stack:
aload 2
iload 3
aload 4
aload 0
getfield org.springframework.boot.util.Instantiator.type:Ljava/lang/Class;
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
aastore
end local 4 7: iinc 3 1
StackMap locals:
StackMap stack:
8: iload 3
aload 1
arraylength
if_icmplt 3
end local 3 9: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 10 1 parameterTypes [Ljava/lang/Class;
1 10 2 args [Ljava/lang/Object;
2 9 3 i I
4 7 4 parameter Ljava/util/function/Function<Ljava/lang/Class<*>;Ljava/lang/Object;>;
Signature: ([Ljava/lang/Class<*>;)[Ljava/lang/Object;
MethodParameters:
Name Flags
parameterTypes
private java.util.function.Function<java.lang.Class<?>, java.lang.Object> getAvailableParameter(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljava/util/function/Function;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.springframework.boot.util.Instantiator.availableParameters:Ljava/util/Map;
invokeinterface java.util.Map.entrySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: org.springframework.boot.util.Instantiator java.lang.Class top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Map$Entry
astore 2
start local 2 2: aload 2
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
checkcast java.lang.Class
aload 1
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 4
3: aload 2
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast java.util.function.Function
areturn
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
5: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/boot/util/Instantiator<TT;>;
0 6 1 parameterType Ljava/lang/Class<*>;
2 4 2 entry Ljava/util/Map$Entry<Ljava/lang/Class<*>;Ljava/util/function/Function<Ljava/lang/Class<*>;Ljava/lang/Object;>;>;
Signature: (Ljava/lang/Class<*>;)Ljava/util/function/Function<Ljava/lang/Class<*>;Ljava/lang/Object;>;
MethodParameters:
Name Flags
parameterType
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "Instantiator.java"
NestMembers:
org.springframework.boot.util.Instantiator$1 org.springframework.boot.util.Instantiator$AvailableParameters
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract Entry = java.util.Map$Entry of java.util.Map
org.springframework.boot.util.Instantiator$1
public abstract AvailableParameters = org.springframework.boot.util.Instantiator$AvailableParameters of org.springframework.boot.util.Instantiator