Package org.objectweb.asm

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


            mv.visitInsn( DUP );
            mv.visitInsn( ICONST_5 );
            mv.visitFieldInsn( GETSTATIC, "java/lang/Long", "TYPE", "Ljava/lang/Class;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 6 );
            mv.visitFieldInsn( GETSTATIC, "java/lang/Short", "TYPE", "Ljava/lang/Class;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 7 );
            mv.visitFieldInsn( GETSTATIC, "java/lang/Byte", "TYPE", "Ljava/lang/Class;" );
View Full Code Here


            mv.visitInsn( ICONST_5 );
            mv.visitVarInsn( LLOAD, 7 );
            mv.visitMethodInsn( INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 6 );
            mv.visitVarInsn( ILOAD, 9 );
            mv.visitMethodInsn( INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 7 );
View Full Code Here

            mv.visitIntInsn( BIPUSH, 6 );
            mv.visitVarInsn( ILOAD, 9 );
            mv.visitMethodInsn( INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 7 );
            mv.visitVarInsn( ILOAD, 10 );
            mv.visitMethodInsn( INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 8 );
View Full Code Here

            mv.visitIntInsn( BIPUSH, 7 );
            mv.visitVarInsn( ILOAD, 10 );
            mv.visitMethodInsn( INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;" );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 8 );
            mv.visitVarInsn( ALOAD, 11 );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 9 );
            mv.visitVarInsn( ALOAD, 12 );
View Full Code Here

            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 8 );
            mv.visitVarInsn( ALOAD, 11 );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 9 );
            mv.visitVarInsn( ALOAD, 12 );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 10 );
            mv.visitVarInsn( ALOAD, 13 );
View Full Code Here

            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 9 );
            mv.visitVarInsn( ALOAD, 12 );
            mv.visitInsn( AASTORE );
            mv.visitInsn( DUP );
            mv.visitIntInsn( BIPUSH, 10 );
            mv.visitVarInsn( ALOAD, 13 );
            mv.visitInsn( AASTORE );
            mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/spi/composite/CompositeInvoker", "invokeComposite",
                                "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;" );
            mv.visitInsn( POP );
View Full Code Here

            mv.visitLabel( l0 );
            mv.visitVarInsn( ALOAD, 0 );
            mv.visitFieldInsn( GETFIELD, "org/qi4j/satisfiedBy/SomeMixin_Stub", "_instance",
                               "Lorg/qi4j/spi/composite/CompositeInvoker;" );
            mv.visitFieldInsn( GETSTATIC, "org/qi4j/satisfiedBy/SomeMixin_Stub", "m3", "Ljava/lang/reflect/Method;" );
            mv.visitIntInsn( BIPUSH, 11 );
            mv.visitTypeInsn( ANEWARRAY, "java/lang/Object" );
            mv.visitInsn( DUP );
            mv.visitInsn( ICONST_0 );
            mv.visitVarInsn( DLOAD, 1 );
            mv.visitMethodInsn( INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;" );
View Full Code Here

              String methodName = methodNames[i];
              Class[] paramTypes = parameterTypes[i];
              Class returnType = returnTypes[i];
              for (int paramIndex = 0; paramIndex < paramTypes.length; paramIndex++) {
                mv.visitVarInsn(ALOAD, 3);
                mv.visitIntInsn(BIPUSH, paramIndex);
                mv.visitInsn(AALOAD);
                Type paramType = Type.getType(paramTypes[paramIndex]);
                switch (paramType.getSort()) {
                case Type.BOOLEAN:
                  mv.visitTypeInsn(CHECKCAST, "java/lang/Boolean");
View Full Code Here

        // push return type
        mv.visitLdcInsn(selectMethod.getReturnType().getName());

        // new Object[]
        mv.visitIntInsn(BIPUSH, selectMethod.getParameterTypes().length);
        mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");

        // object[i] = arg${i}
        int i = 0;
        for (Class<?> parameterType : selectMethod.getParameterTypes()) {
View Full Code Here

                    mv.visitFieldInsn(Opcodes.GETFIELD, periodToSlashes(newClassName),
                                      "factory",
                                      "L" + periodToSlashes(objectFactoryClass.getName()) + ";");
                }
                mv.visitVarInsn(Opcodes.ALOAD, 1);
                mv.visitIntInsn(Opcodes.BIPUSH, x);
                mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;");
               
                if (tp.isPrimitive()) {
                    mv.visitTypeInsn(Opcodes.CHECKCAST, NONPRIMITIVE_MAP.get(tp));
                    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, NONPRIMITIVE_MAP.get(tp),
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.