Examples of visitMultiANewArrayInsn()


Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

        mv.visitTypeInsn(ANEWARRAY, "Boo");
        mv.visitTypeInsn(ANEWARRAY, "[LDoo;");
        mv.visitTypeInsn(ANEWARRAY, "[I");
        mv.visitTypeInsn(ANEWARRAY, "J");
       
        mv.visitMultiANewArrayInsn("[[LBoo;", 2);
        mv.visitMethodInsn(INVOKEVIRTUAL,
                "Doo",
                "goo",
                "([[LBoo;LCoo;LDoo;)LCoo;");
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

    public void testIllegalMultiANewArrayDesc() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitMultiANewArrayInsn("I", 1);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

    public void testIllegalMultiANewArrayDims() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitMultiANewArrayInsn("[[I", 0);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

    public void testIllegalMultiANewArrayDims2() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitMultiANewArrayInsn("[[I", 3);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

        mv.visitInsn(ATHROW);
        // misc instructions to cover code in MethodWriter.resizeInsns
        mv.visitLabel(l0);
        mv.visitInsn(ICONST_1);
        mv.visitInsn(ICONST_2);
        mv.visitMultiANewArrayInsn("[[I", 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()V");
        // end method
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

        mv.visitInsn(ICONST_1);
        mv.visitTypeInsn(ANEWARRAY, "[I");
        mv.visitInsn(ICONST_1);
        mv.visitInsn(ICONST_2);
        mv.visitInsn(ICONST_3);
        mv.visitMultiANewArrayInsn("[[[I", 3);
        // array length
        mv.visitInsn(ARRAYLENGTH);
        // end method
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

                // push args onto the stack
                for (int i = 0; i < nSizedDims; i++) {
                    encodeExpr(cice.getArg(i), context);              
                }
               
                mv.visitMultiANewArrayInsn(arrayType.getJVMInternalName(), nSizedDims);
               
                return arrayType;
            }
                                                                    
        } else if (classType instanceof JavaTypeName.Reference.Object) {
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMultiANewArrayInsn()

        }

        int storeIns = AASTORE;
        if (sizeExpression != null) {
            arrayTypeName = BytecodeHelper.getTypeDescription(expression.getType());
            mv.visitMultiANewArrayInsn(arrayTypeName, dimensions);
        } else if (ClassHelper.isPrimitiveType(elementType)) {
            int primType = 0;
            if (elementType == ClassHelper.boolean_TYPE) {
                primType = T_BOOLEAN;
                storeIns = BASTORE;
View Full Code Here

Examples of org.objectweb.asm.commons.GeneratorAdapter.visitMultiANewArrayInsn()

              }
              // If we're just a single array, then call the newArray method, otherwise use the MultiANewArray instruction.
              if (index == 1) {
                methodAdapter.newArray(type.getElementType());
              } else {
                methodAdapter.visitMultiANewArrayInsn(type.getDescriptor(), index);
              }
              break;
            case Type.BOOLEAN:
              methodAdapter.push(true);
              break;
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitMultiANewArrayInsn()

        mv.visitInsn(ATHROW);
        // misc instructions to cover code in MethodWriter.resizeInsns
        mv.visitLabel(l0);
        mv.visitInsn(ICONST_1);
        mv.visitInsn(ICONST_2);
        mv.visitMultiANewArrayInsn("[[I", 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()V");
        // end method
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.