.class public abstract Lcom/esotericsoftware/reflectasm/MethodAccess; .super Ljava/lang/Object; .source "MethodAccess.java" # instance fields .field private methodNames:[Ljava/lang/String; .field private parameterTypes:[[Ljava/lang/Class; .field private returnTypes:[Ljava/lang/Class; # direct methods .method public constructor ()V .locals 0 .prologue invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method private static addDeclaredMethodsToList(Ljava/lang/Class;Ljava/util/ArrayList;)V .locals 6 .param p0, "type" # Ljava/lang/Class; .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Class;", "Ljava/util/ArrayList", "<", "Ljava/lang/reflect/Method;", ">;)V" } .end annotation .prologue .local p1, "methods":Ljava/util/ArrayList;, "Ljava/util/ArrayList;" invoke-virtual {p0}, Ljava/lang/Class;->getDeclaredMethods()[Ljava/lang/reflect/Method; move-result-object v0 .local v0, "declaredMethods":[Ljava/lang/reflect/Method; const/4 v1, 0x0 .local v1, "i":I array-length v4, v0 .local v4, "n":I :goto_0 if-ge v1, v4, :cond_2 aget-object v2, v0, v1 .local v2, "method":Ljava/lang/reflect/Method; invoke-virtual {v2}, Ljava/lang/reflect/Method;->getModifiers()I move-result v3 .local v3, "modifiers":I invoke-static {v3}, Ljava/lang/reflect/Modifier;->isStatic(I)Z move-result v5 if-eqz v5, :cond_1 :cond_0 :goto_1 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_1 invoke-static {v3}, Ljava/lang/reflect/Modifier;->isPrivate(I)Z move-result v5 if-nez v5, :cond_0 invoke-virtual {p1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z goto :goto_1 .end local v2 # "method":Ljava/lang/reflect/Method; .end local v3 # "modifiers":I :cond_2 return-void .end method .method public static get(Ljava/lang/Class;)Lcom/esotericsoftware/reflectasm/MethodAccess; .locals 38 .param p0, "type" # Ljava/lang/Class; .prologue new-instance v28, Ljava/util/ArrayList; invoke-direct/range {v28 .. v28}, Ljava/util/ArrayList;->()V .local v28, "methods":Ljava/util/ArrayList;, "Ljava/util/ArrayList;" invoke-virtual/range {p0 .. p0}, Ljava/lang/Class;->isInterface()Z move-result v22 .local v22, "isInterface":Z if-nez v22, :cond_0 move-object/from16 v30, p0 .local v30, "nextClass":Ljava/lang/Class; :goto_0 const-class v3, Ljava/lang/Object; move-object/from16 v0, v30 if-eq v0, v3, :cond_1 move-object/from16 v0, v30 move-object/from16 v1, v28 invoke-static {v0, v1}, Lcom/esotericsoftware/reflectasm/MethodAccess;->addDeclaredMethodsToList(Ljava/lang/Class;Ljava/util/ArrayList;)V invoke-virtual/range {v30 .. v30}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class; move-result-object v30 goto :goto_0 .end local v30 # "nextClass":Ljava/lang/Class; :cond_0 move-object/from16 v0, p0 move-object/from16 v1, v28 invoke-static {v0, v1}, Lcom/esotericsoftware/reflectasm/MethodAccess;->recursiveAddInterfaceMethodsToList(Ljava/lang/Class;Ljava/util/ArrayList;)V :cond_1 invoke-virtual/range {v28 .. v28}, Ljava/util/ArrayList;->size()I move-result v29 .local v29, "n":I move/from16 v0, v29 new-array v0, v0, [Ljava/lang/String; move-object/from16 v27, v0 .local v27, "methodNames":[Ljava/lang/String; move/from16 v0, v29 new-array v0, v0, [[Ljava/lang/Class; move-object/from16 v34, v0 .local v34, "parameterTypes":[[Ljava/lang/Class; move/from16 v0, v29 new-array v0, v0, [Ljava/lang/Class; move-object/from16 v36, v0 .local v36, "returnTypes":[Ljava/lang/Class; const/16 v20, 0x0 .local v20, "i":I :goto_1 move/from16 v0, v20 move/from16 v1, v29 if-ge v0, v1, :cond_2 move-object/from16 v0, v28 move/from16 v1, v20 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object v25 check-cast v25, Ljava/lang/reflect/Method; .local v25, "method":Ljava/lang/reflect/Method; invoke-virtual/range {v25 .. v25}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String; move-result-object v3 aput-object v3, v27, v20 invoke-virtual/range {v25 .. v25}, Ljava/lang/reflect/Method;->getParameterTypes()[Ljava/lang/Class; move-result-object v3 aput-object v3, v34, v20 invoke-virtual/range {v25 .. v25}, Ljava/lang/reflect/Method;->getReturnType()Ljava/lang/Class; move-result-object v3 aput-object v3, v36, v20 add-int/lit8 v20, v20, 0x1 goto :goto_1 .end local v25 # "method":Ljava/lang/reflect/Method; :cond_2 invoke-virtual/range {p0 .. p0}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object v16 .local v16, "className":Ljava/lang/String; new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V move-object/from16 v0, v16 invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 const-string v4, "MethodAccess" invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v14 .local v14, "accessClassName":Ljava/lang/String; const-string v3, "java." invoke-virtual {v14, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z move-result v3 if-eqz v3, :cond_3 new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "reflectasm." invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v14 :cond_3 invoke-static/range {p0 .. p0}, Lcom/esotericsoftware/reflectasm/AccessClassLoader;->get(Ljava/lang/Class;)Lcom/esotericsoftware/reflectasm/AccessClassLoader; move-result-object v24 .local v24, "loader":Lcom/esotericsoftware/reflectasm/AccessClassLoader; monitor-enter v24 :try_start_0 move-object/from16 v0, v24 invoke-virtual {v0, v14}, Lcom/esotericsoftware/reflectasm/AccessClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class; :try_end_0 .catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 move-result-object v13 .local v13, "accessClass":Ljava/lang/Class; :goto_2 :try_start_1 monitor-exit v24 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 :try_start_2 invoke-virtual {v13}, Ljava/lang/Class;->newInstance()Ljava/lang/Object; move-result-object v12 check-cast v12, Lcom/esotericsoftware/reflectasm/MethodAccess; .local v12, "access":Lcom/esotericsoftware/reflectasm/MethodAccess; move-object/from16 v0, v27 iput-object v0, v12, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; move-object/from16 v0, v34 iput-object v0, v12, Lcom/esotericsoftware/reflectasm/MethodAccess;->parameterTypes:[[Ljava/lang/Class; move-object/from16 v0, v36 iput-object v0, v12, Lcom/esotericsoftware/reflectasm/MethodAccess;->returnTypes:[Ljava/lang/Class; :try_end_2 .catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_1 return-object v12 .end local v12 # "access":Lcom/esotericsoftware/reflectasm/MethodAccess; .end local v13 # "accessClass":Ljava/lang/Class; :catch_0 move-exception v21 .local v21, "ignored":Ljava/lang/ClassNotFoundException; const/16 v3, 0x2e const/16 v4, 0x2f :try_start_3 invoke-virtual {v14, v3, v4}, Ljava/lang/String;->replace(CC)Ljava/lang/String; move-result-object v5 .local v5, "accessClassNameInternal":Ljava/lang/String; const/16 v3, 0x2e const/16 v4, 0x2f move-object/from16 v0, v16 invoke-virtual {v0, v3, v4}, Ljava/lang/String;->replace(CC)Ljava/lang/String; move-result-object v17 .local v17, "classNameInternal":Ljava/lang/String; new-instance v2, Lorg/objectweb/asm/ClassWriter; const/4 v3, 0x1 invoke-direct {v2, v3}, Lorg/objectweb/asm/ClassWriter;->(I)V .local v2, "cw":Lorg/objectweb/asm/ClassWriter; const v3, 0x3002d const/16 v4, 0x21 const/4 v6, 0x0 const-string v7, "com/esotericsoftware/reflectasm/MethodAccess" const/4 v8, 0x0 invoke-virtual/range {v2 .. v8}, Lorg/objectweb/asm/ClassWriter;->visit(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V const/4 v7, 0x1 const-string v8, "" const-string v9, "()V" const/4 v10, 0x0 const/4 v11, 0x0 move-object v6, v2 invoke-virtual/range {v6 .. v11}, Lorg/objectweb/asm/ClassWriter;->visitMethod(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Lorg/objectweb/asm/MethodVisitor; move-result-object v6 .local v6, "mv":Lorg/objectweb/asm/MethodVisitor; invoke-virtual {v6}, Lorg/objectweb/asm/MethodVisitor;->visitCode()V const/16 v3, 0x19 const/4 v4, 0x0 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V const/16 v3, 0xb7 const-string v4, "com/esotericsoftware/reflectasm/MethodAccess" const-string v7, "" const-string v8, "()V" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V const/16 v3, 0xb1 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V const/4 v3, 0x0 const/4 v4, 0x0 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitMaxs(II)V invoke-virtual {v6}, Lorg/objectweb/asm/MethodVisitor;->visitEnd()V const/16 v7, 0x81 const-string v8, "invoke" const-string v9, "(Ljava/lang/Object;I[Ljava/lang/Object;)Ljava/lang/Object;" const/4 v10, 0x0 const/4 v11, 0x0 move-object v6, v2 invoke-virtual/range {v6 .. v11}, Lorg/objectweb/asm/ClassWriter;->visitMethod(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Lorg/objectweb/asm/MethodVisitor; .end local v6 # "mv":Lorg/objectweb/asm/MethodVisitor; move-result-object v6 .restart local v6 # "mv":Lorg/objectweb/asm/MethodVisitor; invoke-virtual {v6}, Lorg/objectweb/asm/MethodVisitor;->visitCode()V invoke-virtual/range {v28 .. v28}, Ljava/util/ArrayList;->isEmpty()Z move-result v3 if-nez v3, :cond_9 const/16 v3, 0x19 const/4 v4, 0x1 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V const/16 v3, 0xc0 move-object/from16 v0, v17 invoke-virtual {v6, v3, v0}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0x3a const/4 v4, 0x4 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V const/16 v3, 0x15 const/4 v4, 0x2 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V move/from16 v0, v29 new-array v0, v0, [Lorg/objectweb/asm/Label; move-object/from16 v23, v0 .local v23, "labels":[Lorg/objectweb/asm/Label; const/16 v20, 0x0 :goto_3 move/from16 v0, v20 move/from16 v1, v29 if-ge v0, v1, :cond_4 new-instance v3, Lorg/objectweb/asm/Label; invoke-direct {v3}, Lorg/objectweb/asm/Label;->()V aput-object v3, v23, v20 add-int/lit8 v20, v20, 0x1 goto :goto_3 :cond_4 new-instance v19, Lorg/objectweb/asm/Label; invoke-direct/range {v19 .. v19}, Lorg/objectweb/asm/Label;->()V .local v19, "defaultLabel":Lorg/objectweb/asm/Label; const/4 v3, 0x0 move-object/from16 v0, v23 array-length v4, v0 add-int/lit8 v4, v4, -0x1 move-object/from16 v0, v19 move-object/from16 v1, v23 invoke-virtual {v6, v3, v4, v0, v1}, Lorg/objectweb/asm/MethodVisitor;->visitTableSwitchInsn(IILorg/objectweb/asm/Label;[Lorg/objectweb/asm/Label;)V new-instance v15, Ljava/lang/StringBuilder; const/16 v3, 0x80 invoke-direct {v15, v3}, Ljava/lang/StringBuilder;->(I)V .local v15, "buffer":Ljava/lang/StringBuilder; const/16 v20, 0x0 :goto_4 move/from16 v0, v20 move/from16 v1, v29 if-ge v0, v1, :cond_8 aget-object v3, v23, v20 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitLabel(Lorg/objectweb/asm/Label;)V if-nez v20, :cond_5 const/4 v7, 0x1 const/4 v8, 0x1 const/4 v3, 0x1 new-array v9, v3, [Ljava/lang/Object; const/4 v3, 0x0 aput-object v17, v9, v3 const/4 v10, 0x0 const/4 v11, 0x0 invoke-virtual/range {v6 .. v11}, Lorg/objectweb/asm/MethodVisitor;->visitFrame(II[Ljava/lang/Object;I[Ljava/lang/Object;)V :goto_5 const/16 v3, 0x19 const/4 v4, 0x4 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V const/4 v3, 0x0 invoke-virtual {v15, v3}, Ljava/lang/StringBuilder;->setLength(I)V const/16 v3, 0x28 invoke-virtual {v15, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; aget-object v26, v27, v20 .local v26, "methodName":Ljava/lang/String; aget-object v33, v34, v20 .local v33, "paramTypes":[Ljava/lang/Class; aget-object v35, v36, v20 .local v35, "returnType":Ljava/lang/Class; const/16 v31, 0x0 .local v31, "paramIndex":I :goto_6 move-object/from16 v0, v33 array-length v3, v0 move/from16 v0, v31 if-ge v0, v3, :cond_6 const/16 v3, 0x19 const/4 v4, 0x3 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V const/16 v3, 0x10 move/from16 v0, v31 invoke-virtual {v6, v3, v0}, Lorg/objectweb/asm/MethodVisitor;->visitIntInsn(II)V const/16 v3, 0x32 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V aget-object v3, v33, v31 invoke-static {v3}, Lorg/objectweb/asm/Type;->getType(Ljava/lang/Class;)Lorg/objectweb/asm/Type; move-result-object v32 .local v32, "paramType":Lorg/objectweb/asm/Type; invoke-virtual/range {v32 .. v32}, Lorg/objectweb/asm/Type;->getSort()I move-result v3 packed-switch v3, :pswitch_data_0 :goto_7 invoke-virtual/range {v32 .. v32}, Lorg/objectweb/asm/Type;->getDescriptor()Ljava/lang/String; move-result-object v3 invoke-virtual {v15, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; add-int/lit8 v31, v31, 0x1 goto :goto_6 .end local v26 # "methodName":Ljava/lang/String; .end local v31 # "paramIndex":I .end local v32 # "paramType":Lorg/objectweb/asm/Type; .end local v33 # "paramTypes":[Ljava/lang/Class; .end local v35 # "returnType":Ljava/lang/Class; :cond_5 const/4 v7, 0x3 const/4 v8, 0x0 const/4 v9, 0x0 const/4 v10, 0x0 const/4 v11, 0x0 invoke-virtual/range {v6 .. v11}, Lorg/objectweb/asm/MethodVisitor;->visitFrame(II[Ljava/lang/Object;I[Ljava/lang/Object;)V goto :goto_5 .end local v2 # "cw":Lorg/objectweb/asm/ClassWriter; .end local v5 # "accessClassNameInternal":Ljava/lang/String; .end local v6 # "mv":Lorg/objectweb/asm/MethodVisitor; .end local v15 # "buffer":Ljava/lang/StringBuilder; .end local v17 # "classNameInternal":Ljava/lang/String; .end local v19 # "defaultLabel":Lorg/objectweb/asm/Label; .end local v21 # "ignored":Ljava/lang/ClassNotFoundException; .end local v23 # "labels":[Lorg/objectweb/asm/Label; :catchall_0 move-exception v3 monitor-exit v24 :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_0 throw v3 .restart local v2 # "cw":Lorg/objectweb/asm/ClassWriter; .restart local v5 # "accessClassNameInternal":Ljava/lang/String; .restart local v6 # "mv":Lorg/objectweb/asm/MethodVisitor; .restart local v15 # "buffer":Ljava/lang/StringBuilder; .restart local v17 # "classNameInternal":Ljava/lang/String; .restart local v19 # "defaultLabel":Lorg/objectweb/asm/Label; .restart local v21 # "ignored":Ljava/lang/ClassNotFoundException; .restart local v23 # "labels":[Lorg/objectweb/asm/Label; .restart local v26 # "methodName":Ljava/lang/String; .restart local v31 # "paramIndex":I .restart local v32 # "paramType":Lorg/objectweb/asm/Type; .restart local v33 # "paramTypes":[Ljava/lang/Class; .restart local v35 # "returnType":Ljava/lang/Class; :pswitch_0 const/16 v3, 0xc0 :try_start_4 const-string v4, "java/lang/Boolean" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Boolean" const-string v7, "booleanValue" const-string v8, "()Z" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_7 :pswitch_1 const/16 v3, 0xc0 const-string v4, "java/lang/Byte" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Byte" const-string v7, "byteValue" const-string v8, "()B" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_7 :pswitch_2 const/16 v3, 0xc0 const-string v4, "java/lang/Character" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Character" const-string v7, "charValue" const-string v8, "()C" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_7 :pswitch_3 const/16 v3, 0xc0 const-string v4, "java/lang/Short" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Short" const-string v7, "shortValue" const-string v8, "()S" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_7 :pswitch_4 const/16 v3, 0xc0 const-string v4, "java/lang/Integer" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Integer" const-string v7, "intValue" const-string v8, "()I" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_7 :pswitch_5 const/16 v3, 0xc0 const-string v4, "java/lang/Float" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Float" const-string v7, "floatValue" const-string v8, "()F" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto/16 :goto_7 :pswitch_6 const/16 v3, 0xc0 const-string v4, "java/lang/Long" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Long" const-string v7, "longValue" const-string v8, "()J" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto/16 :goto_7 :pswitch_7 const/16 v3, 0xc0 const-string v4, "java/lang/Double" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/Double" const-string v7, "doubleValue" const-string v8, "()D" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto/16 :goto_7 :pswitch_8 const/16 v3, 0xc0 invoke-virtual/range {v32 .. v32}, Lorg/objectweb/asm/Type;->getDescriptor()Ljava/lang/String; move-result-object v4 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V goto/16 :goto_7 :pswitch_9 const/16 v3, 0xc0 invoke-virtual/range {v32 .. v32}, Lorg/objectweb/asm/Type;->getInternalName()Ljava/lang/String; move-result-object v4 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V goto/16 :goto_7 .end local v32 # "paramType":Lorg/objectweb/asm/Type; :cond_6 const/16 v3, 0x29 invoke-virtual {v15, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; invoke-static/range {v35 .. v35}, Lorg/objectweb/asm/Type;->getDescriptor(Ljava/lang/Class;)Ljava/lang/String; move-result-object v3 invoke-virtual {v15, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; if-eqz v22, :cond_7 const/16 v3, 0xb9 :goto_8 invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v4 move-object/from16 v0, v17 move-object/from16 v1, v26 invoke-virtual {v6, v3, v0, v1, v4}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V invoke-static/range {v35 .. v35}, Lorg/objectweb/asm/Type;->getType(Ljava/lang/Class;)Lorg/objectweb/asm/Type; move-result-object v3 invoke-virtual {v3}, Lorg/objectweb/asm/Type;->getSort()I move-result v3 packed-switch v3, :pswitch_data_1 :goto_9 const/16 v3, 0xb0 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V add-int/lit8 v20, v20, 0x1 goto/16 :goto_4 :cond_7 const/16 v3, 0xb6 goto :goto_8 :pswitch_a const/4 v3, 0x1 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V goto :goto_9 :pswitch_b const/16 v3, 0xb8 const-string v4, "java/lang/Boolean" const-string v7, "valueOf" const-string v8, "(Z)Ljava/lang/Boolean;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_c const/16 v3, 0xb8 const-string v4, "java/lang/Byte" const-string v7, "valueOf" const-string v8, "(B)Ljava/lang/Byte;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_d const/16 v3, 0xb8 const-string v4, "java/lang/Character" const-string v7, "valueOf" const-string v8, "(C)Ljava/lang/Character;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_e const/16 v3, 0xb8 const-string v4, "java/lang/Short" const-string v7, "valueOf" const-string v8, "(S)Ljava/lang/Short;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_f const/16 v3, 0xb8 const-string v4, "java/lang/Integer" const-string v7, "valueOf" const-string v8, "(I)Ljava/lang/Integer;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_10 const/16 v3, 0xb8 const-string v4, "java/lang/Float" const-string v7, "valueOf" const-string v8, "(F)Ljava/lang/Float;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_11 const/16 v3, 0xb8 const-string v4, "java/lang/Long" const-string v7, "valueOf" const-string v8, "(J)Ljava/lang/Long;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 :pswitch_12 const/16 v3, 0xb8 const-string v4, "java/lang/Double" const-string v7, "valueOf" const-string v8, "(D)Ljava/lang/Double;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V goto :goto_9 .end local v26 # "methodName":Ljava/lang/String; .end local v31 # "paramIndex":I .end local v33 # "paramTypes":[Ljava/lang/Class; .end local v35 # "returnType":Ljava/lang/Class; :cond_8 move-object/from16 v0, v19 invoke-virtual {v6, v0}, Lorg/objectweb/asm/MethodVisitor;->visitLabel(Lorg/objectweb/asm/Label;)V const/4 v7, 0x3 const/4 v8, 0x0 const/4 v9, 0x0 const/4 v10, 0x0 const/4 v11, 0x0 invoke-virtual/range {v6 .. v11}, Lorg/objectweb/asm/MethodVisitor;->visitFrame(II[Ljava/lang/Object;I[Ljava/lang/Object;)V .end local v15 # "buffer":Ljava/lang/StringBuilder; .end local v19 # "defaultLabel":Lorg/objectweb/asm/Label; .end local v23 # "labels":[Lorg/objectweb/asm/Label; :cond_9 const/16 v3, 0xbb const-string v4, "java/lang/IllegalArgumentException" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0x59 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V const/16 v3, 0xbb const-string v4, "java/lang/StringBuilder" invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitTypeInsn(ILjava/lang/String;)V const/16 v3, 0x59 invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V const-string v3, "Method not found: " invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitLdcInsn(Ljava/lang/Object;)V const/16 v3, 0xb7 const-string v4, "java/lang/StringBuilder" const-string v7, "" const-string v8, "(Ljava/lang/String;)V" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V const/16 v3, 0x15 const/4 v4, 0x2 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitVarInsn(II)V const/16 v3, 0xb6 const-string v4, "java/lang/StringBuilder" const-string v7, "append" const-string v8, "(I)Ljava/lang/StringBuilder;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V const/16 v3, 0xb6 const-string v4, "java/lang/StringBuilder" const-string v7, "toString" const-string v8, "()Ljava/lang/String;" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V const/16 v3, 0xb7 const-string v4, "java/lang/IllegalArgumentException" const-string v7, "" const-string v8, "(Ljava/lang/String;)V" invoke-virtual {v6, v3, v4, v7, v8}, Lorg/objectweb/asm/MethodVisitor;->visitMethodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V const/16 v3, 0xbf invoke-virtual {v6, v3}, Lorg/objectweb/asm/MethodVisitor;->visitInsn(I)V const/4 v3, 0x0 const/4 v4, 0x0 invoke-virtual {v6, v3, v4}, Lorg/objectweb/asm/MethodVisitor;->visitMaxs(II)V invoke-virtual {v6}, Lorg/objectweb/asm/MethodVisitor;->visitEnd()V invoke-virtual {v2}, Lorg/objectweb/asm/ClassWriter;->visitEnd()V invoke-virtual {v2}, Lorg/objectweb/asm/ClassWriter;->toByteArray()[B move-result-object v18 .local v18, "data":[B move-object/from16 v0, v24 move-object/from16 v1, v18 invoke-virtual {v0, v14, v1}, Lcom/esotericsoftware/reflectasm/AccessClassLoader;->defineClass(Ljava/lang/String;[B)Ljava/lang/Class; :try_end_4 .catchall {:try_start_4 .. :try_end_4} :catchall_0 move-result-object v13 .restart local v13 # "accessClass":Ljava/lang/Class; goto/16 :goto_2 .end local v2 # "cw":Lorg/objectweb/asm/ClassWriter; .end local v5 # "accessClassNameInternal":Ljava/lang/String; .end local v6 # "mv":Lorg/objectweb/asm/MethodVisitor; .end local v17 # "classNameInternal":Ljava/lang/String; .end local v18 # "data":[B .end local v21 # "ignored":Ljava/lang/ClassNotFoundException; :catch_1 move-exception v37 .local v37, "t":Ljava/lang/Throwable; new-instance v3, Ljava/lang/RuntimeException; new-instance v4, Ljava/lang/StringBuilder; invoke-direct {v4}, Ljava/lang/StringBuilder;->()V const-string v7, "Error constructing method access class: " invoke-virtual {v4, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v4 move-object/from16 v0, v37 invoke-direct {v3, v4, v0}, Ljava/lang/RuntimeException;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw v3 nop :pswitch_data_0 .packed-switch 0x1 :pswitch_0 :pswitch_2 :pswitch_1 :pswitch_3 :pswitch_4 :pswitch_5 :pswitch_6 :pswitch_7 :pswitch_8 :pswitch_9 .end packed-switch :pswitch_data_1 .packed-switch 0x0 :pswitch_a :pswitch_b :pswitch_d :pswitch_c :pswitch_e :pswitch_f :pswitch_10 :pswitch_11 :pswitch_12 .end packed-switch .end method .method private static recursiveAddInterfaceMethodsToList(Ljava/lang/Class;Ljava/util/ArrayList;)V .locals 4 .param p0, "interfaceType" # Ljava/lang/Class; .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Class;", "Ljava/util/ArrayList", "<", "Ljava/lang/reflect/Method;", ">;)V" } .end annotation .prologue .local p1, "methods":Ljava/util/ArrayList;, "Ljava/util/ArrayList;" invoke-static {p0, p1}, Lcom/esotericsoftware/reflectasm/MethodAccess;->addDeclaredMethodsToList(Ljava/lang/Class;Ljava/util/ArrayList;)V invoke-virtual {p0}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class; move-result-object v2 array-length v3, v2 const/4 v1, 0x0 :goto_0 if-ge v1, v3, :cond_0 aget-object v0, v2, v1 .local v0, "nextInterface":Ljava/lang/Class; invoke-static {v0, p1}, Lcom/esotericsoftware/reflectasm/MethodAccess;->recursiveAddInterfaceMethodsToList(Ljava/lang/Class;Ljava/util/ArrayList;)V add-int/lit8 v1, v1, 0x1 goto :goto_0 .end local v0 # "nextInterface":Ljava/lang/Class; :cond_0 return-void .end method # virtual methods .method public getIndex(Ljava/lang/String;)I .locals 5 .param p1, "methodName" # Ljava/lang/String; .prologue const/4 v0, 0x0 .local v0, "i":I iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; array-length v1, v2 .local v1, "n":I :goto_0 if-ge v0, v1, :cond_1 iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; aget-object v2, v2, v0 invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_0 return v0 :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 new-instance v2, Ljava/lang/IllegalArgumentException; new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "Unable to find non-private method: " invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v2 .end method .method public getIndex(Ljava/lang/String;I)I .locals 5 .param p1, "methodName" # Ljava/lang/String; .param p2, "paramsCount" # I .prologue const/4 v0, 0x0 .local v0, "i":I iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; array-length v1, v2 .local v1, "n":I :goto_0 if-ge v0, v1, :cond_1 iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; aget-object v2, v2, v0 invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_0 iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->parameterTypes:[[Ljava/lang/Class; aget-object v2, v2, v0 array-length v2, v2 if-ne v2, p2, :cond_0 return v0 :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 new-instance v2, Ljava/lang/IllegalArgumentException; new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "Unable to find non-private method: " invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 const-string v4, " with " invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v3 const-string v4, " params." invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v2 .end method .method public varargs getIndex(Ljava/lang/String;[Ljava/lang/Class;)I .locals 5 .param p1, "methodName" # Ljava/lang/String; .param p2, "paramTypes" # [Ljava/lang/Class; .prologue const/4 v0, 0x0 .local v0, "i":I iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; array-length v1, v2 .local v1, "n":I :goto_0 if-ge v0, v1, :cond_1 iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; aget-object v2, v2, v0 invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_0 iget-object v2, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->parameterTypes:[[Ljava/lang/Class; aget-object v2, v2, v0 invoke-static {p2, v2}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_0 return v0 :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 new-instance v2, Ljava/lang/IllegalArgumentException; new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "Unable to find non-private method: " invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 const-string v4, " " invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-static {p2}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String; move-result-object v4 invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v2 .end method .method public getMethodNames()[Ljava/lang/String; .locals 1 .prologue iget-object v0, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->methodNames:[Ljava/lang/String; return-object v0 .end method .method public getParameterTypes()[[Ljava/lang/Class; .locals 1 .prologue iget-object v0, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->parameterTypes:[[Ljava/lang/Class; return-object v0 .end method .method public getReturnTypes()[Ljava/lang/Class; .locals 1 .prologue iget-object v0, p0, Lcom/esotericsoftware/reflectasm/MethodAccess;->returnTypes:[Ljava/lang/Class; return-object v0 .end method .method public varargs abstract invoke(Ljava/lang/Object;I[Ljava/lang/Object;)Ljava/lang/Object; .end method .method public varargs invoke(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object; .locals 1 .param p1, "object" # Ljava/lang/Object; .param p2, "methodName" # Ljava/lang/String; .param p3, "paramTypes" # [Ljava/lang/Class; .param p4, "args" # [Ljava/lang/Object; .prologue invoke-virtual {p0, p2, p3}, Lcom/esotericsoftware/reflectasm/MethodAccess;->getIndex(Ljava/lang/String;[Ljava/lang/Class;)I move-result v0 invoke-virtual {p0, p1, v0, p4}, Lcom/esotericsoftware/reflectasm/MethodAccess;->invoke(Ljava/lang/Object;I[Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method public varargs invoke(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; .locals 1 .param p1, "object" # Ljava/lang/Object; .param p2, "methodName" # Ljava/lang/String; .param p3, "args" # [Ljava/lang/Object; .prologue if-nez p3, :cond_0 const/4 v0, 0x0 :goto_0 invoke-virtual {p0, p2, v0}, Lcom/esotericsoftware/reflectasm/MethodAccess;->getIndex(Ljava/lang/String;I)I move-result v0 invoke-virtual {p0, p1, v0, p3}, Lcom/esotericsoftware/reflectasm/MethodAccess;->invoke(Ljava/lang/Object;I[Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 return-object v0 :cond_0 array-length v0, p3 goto :goto_0 .end method