public class org.apache.commons.collections4.functors.InstantiateFactory<T> implements org.apache.commons.collections4.Factory<T>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.commons.collections4.functors.InstantiateFactory
super_class: java.lang.Object
{
private final java.lang.Class<T> iClassToInstantiate;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<TT;>;
private final java.lang.Class<?>[] iParamTypes;
descriptor: [Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: [Ljava/lang/Class<*>;
private final java.lang.Object[] iArgs;
descriptor: [Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private transient java.lang.reflect.Constructor<T> iConstructor;
descriptor: Ljava/lang/reflect/Constructor;
flags: (0x0082) ACC_PRIVATE, ACC_TRANSIENT
Signature: Ljava/lang/reflect/Constructor<TT;>;
public static <T> org.apache.commons.collections4.Factory<T> instantiateFactory(java.lang.Class<T>, java.lang.Class<?>[], []);
descriptor: (Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Object;)Lorg/apache/commons/collections4/Factory;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
ifnonnull 2
1: new java.lang.NullPointerException
dup
ldc "Class to instantiate must not be null"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
ifnonnull 3
aload 2
ifnonnull 5
3: StackMap locals:
StackMap stack:
aload 1
ifnull 4
aload 2
ifnull 5
4: StackMap locals:
StackMap stack:
aload 1
ifnull 6
aload 2
ifnull 6
aload 1
arraylength
aload 2
arraylength
if_icmpeq 6
5: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "Parameter types must match the arguments"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 1
ifnull 7
aload 1
arraylength
ifne 8
7: StackMap locals:
StackMap stack:
new org.apache.commons.collections4.functors.InstantiateFactory
dup
aload 0
invokespecial org.apache.commons.collections4.functors.InstantiateFactory.<init>:(Ljava/lang/Class;)V
areturn
8: StackMap locals:
StackMap stack:
new org.apache.commons.collections4.functors.InstantiateFactory
dup
aload 0
aload 1
aload 2
invokespecial org.apache.commons.collections4.functors.InstantiateFactory.<init>:(Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Object;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 classToInstantiate Ljava/lang/Class<TT;>;
0 9 1 paramTypes [Ljava/lang/Class;
0 9 2 args [Ljava/lang/Object;
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;[Ljava/lang/Class<*>;[Ljava/lang/Object;)Lorg/apache/commons/collections4/Factory<TT;>;
MethodParameters:
Name Flags
classToInstantiate final
paramTypes final
args final
public void <init>(java.lang.Class<T>);
descriptor: (Ljava/lang/Class;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aconst_null
putfield org.apache.commons.collections4.functors.InstantiateFactory.iConstructor:Ljava/lang/reflect/Constructor;
2: aload 0
aload 1
putfield org.apache.commons.collections4.functors.InstantiateFactory.iClassToInstantiate:Ljava/lang/Class;
3: aload 0
aconst_null
putfield org.apache.commons.collections4.functors.InstantiateFactory.iParamTypes:[Ljava/lang/Class;
4: aload 0
aconst_null
putfield org.apache.commons.collections4.functors.InstantiateFactory.iArgs:[Ljava/lang/Object;
5: aload 0
invokevirtual org.apache.commons.collections4.functors.InstantiateFactory.findConstructor:()V
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/commons/collections4/functors/InstantiateFactory<TT;>;
0 7 1 classToInstantiate Ljava/lang/Class<TT;>;
Signature: (Ljava/lang/Class<TT;>;)V
MethodParameters:
Name Flags
classToInstantiate final
public void <init>(java.lang.Class<T>, java.lang.Class<?>[], []);
descriptor: (Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aconst_null
putfield org.apache.commons.collections4.functors.InstantiateFactory.iConstructor:Ljava/lang/reflect/Constructor;
2: aload 0
aload 1
putfield org.apache.commons.collections4.functors.InstantiateFactory.iClassToInstantiate:Ljava/lang/Class;
3: aload 0
aload 2
invokevirtual java.lang.Class[].clone:()Ljava/lang/Object;
checkcast java.lang.Class[]
putfield org.apache.commons.collections4.functors.InstantiateFactory.iParamTypes:[Ljava/lang/Class;
4: aload 0
aload 3
invokevirtual java.lang.Object[].clone:()Ljava/lang/Object;
checkcast java.lang.Object[]
putfield org.apache.commons.collections4.functors.InstantiateFactory.iArgs:[Ljava/lang/Object;
5: aload 0
invokevirtual org.apache.commons.collections4.functors.InstantiateFactory.findConstructor:()V
6: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/commons/collections4/functors/InstantiateFactory<TT;>;
0 7 1 classToInstantiate Ljava/lang/Class<TT;>;
0 7 2 paramTypes [Ljava/lang/Class;
0 7 3 args [Ljava/lang/Object;
Signature: (Ljava/lang/Class<TT;>;[Ljava/lang/Class<*>;[Ljava/lang/Object;)V
MethodParameters:
Name Flags
classToInstantiate final
paramTypes final
args final
private void findConstructor();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield org.apache.commons.collections4.functors.InstantiateFactory.iClassToInstantiate:Ljava/lang/Class;
aload 0
getfield org.apache.commons.collections4.functors.InstantiateFactory.iParamTypes:[Ljava/lang/Class;
invokevirtual java.lang.Class.getConstructor:([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
putfield org.apache.commons.collections4.functors.InstantiateFactory.iConstructor:Ljava/lang/reflect/Constructor;
1: goto 4
StackMap locals:
StackMap stack: java.lang.NoSuchMethodException
2: pop
3: new java.lang.IllegalArgumentException
dup
ldc "InstantiateFactory: The constructor must exist and be public "
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/commons/collections4/functors/InstantiateFactory<TT;>;
Exception table:
from to target type
0 1 2 Class java.lang.NoSuchMethodException
public T create();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield org.apache.commons.collections4.functors.InstantiateFactory.iConstructor:Ljava/lang/reflect/Constructor;
ifnonnull 2
1: aload 0
invokevirtual org.apache.commons.collections4.functors.InstantiateFactory.findConstructor:()V
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.commons.collections4.functors.InstantiateFactory.iConstructor:Ljava/lang/reflect/Constructor;
aload 0
getfield org.apache.commons.collections4.functors.InstantiateFactory.iArgs:[Ljava/lang/Object;
invokevirtual java.lang.reflect.Constructor.newInstance:([Ljava/lang/Object;)Ljava/lang/Object;
3: areturn
4: StackMap locals:
StackMap stack: java.lang.InstantiationException
astore 1
start local 1 5: new org.apache.commons.collections4.FunctorException
dup
ldc "InstantiateFactory: InstantiationException"
aload 1
invokespecial org.apache.commons.collections4.FunctorException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 6: StackMap locals:
StackMap stack: java.lang.IllegalAccessException
astore 1
start local 1 7: new org.apache.commons.collections4.FunctorException
dup
ldc "InstantiateFactory: Constructor must be public"
aload 1
invokespecial org.apache.commons.collections4.FunctorException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 8: StackMap locals:
StackMap stack: java.lang.reflect.InvocationTargetException
astore 1
start local 1 9: new org.apache.commons.collections4.FunctorException
dup
ldc "InstantiateFactory: Constructor threw an exception"
aload 1
invokespecial org.apache.commons.collections4.FunctorException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/commons/collections4/functors/InstantiateFactory<TT;>;
5 6 1 ex Ljava/lang/InstantiationException;
7 8 1 ex Ljava/lang/IllegalAccessException;
9 10 1 ex Ljava/lang/reflect/InvocationTargetException;
Exception table:
from to target type
2 3 4 Class java.lang.InstantiationException
2 3 6 Class java.lang.IllegalAccessException
2 3 8 Class java.lang.reflect.InvocationTargetException
Signature: ()TT;
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;Lorg/apache/commons/collections4/Factory<TT;>;
SourceFile: "InstantiateFactory.java"