Examples of visitLdcInsn()


Examples of org.apache.xbean.asm4.MethodVisitor.visitLdcInsn()

        }

        // push try code
        mv.visitLabel(l0);
        final String classNameToOverride = method.getDeclaringClass().getName().replace('.', '/');
        mv.visitLdcInsn(Type.getType("L" + classNameToOverride + ";"));

        // the following code generates the bytecode for this line of Java:
        // Method method = <proxy>.class.getMethod("add", new Class[] { <array of function argument classes> });

        // get the method name to invoke, and push to stack
View Full Code Here

Examples of org.apache.xbean.asm5.MethodVisitor.visitLdcInsn()

        }

        // push try code
        mv.visitLabel(l0);
        final String classNameToOverride = method.getDeclaringClass().getName().replace('.', '/');
        mv.visitLdcInsn(Type.getType("L" + classNameToOverride + ";"));

        // the following code generates the bytecode for this line of Java:
        // Method method = <proxy>.class.getMethod("add", new Class[] { <array of function argument classes> });

        // get the method name to invoke, and push to stack
View Full Code Here

Examples of org.deuce.objectweb.asm.MethodVisitor.visitLdcInsn()

      mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[] {"java/lang/Exception"});
      mv.visitVarInsn(ASTORE, 3);
      Label l14 = new Label();
      mv.visitLabel(l14);

      mv.visitLdcInsn("RMI unexporting");
      mv.visitMethodInsn(INVOKESTATIC, "edu/vt/rt/hyflow/util/io/Logger", "error", "(Ljava/lang/String;)V");
      mv.visitLabel(l13);

      mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
      mv.visitVarInsn(ALOAD, 0);
View Full Code Here

Examples of org.drools.asm.MethodVisitor.visitLdcInsn()

                                Type.getInternalName( StringBuffer.class ),
                                "append",
                                "(Ljava/lang/String;)Ljava/lang/StringBuffer;" );

            // buf.append("( ");
            mv.visitLdcInsn( "( " );
            mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL,
                                Type.getInternalName( StringBuffer.class ),
                                "append",
                                "(Ljava/lang/String;)Ljava/lang/StringBuffer;" );
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.asm.CodeVisitor.visitLdcInsn()

        methodAttrs1ann0 = new Annotation("Ljavax/xml/bind/annotation/XmlTransient;");
        methodAttrs1.annotations.add(methodAttrs1ann0);

        cv = cw.visitMethod(Constants.ACC_PUBLIC, "getComponentClass", "()Ljava/lang/Class;", null, methodAttrs1);
        cv.visitLdcInsn(componentType);
        cv.visitInsn(Constants.ARETURN);
        cv.visitMaxs(1, 1);

        cv = cw.visitMethod(Constants.ACC_PUBLIC + Constants.ACC_BRIDGE + Constants.ACC_SYNTHETIC, "getItem", "()Ljava/lang/Object;", null, null);
        cv.visitVarInsn(Constants.ALOAD, 0);
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLdcInsn()

        mv.visitMaxs(1, 1);

        if (componentClass.isArray()) {
            // Write: protected Class adaptedClass()
            mv = cw.visitMethod(Opcodes.ACC_PROTECTED, "adaptedClass", "()Ljava/lang/Class;", null, null);
            mv.visitLdcInsn(Type.getType(L + nestedClass.getQualifiedName().replace(DOT_CHR, SLASH_CHR) + SEMI_COLON));
            mv.visitInsn(Opcodes.ARETURN);
            mv.visitMaxs(1, 1);
        }

        // Write: protected Class componentClass()
View Full Code Here

Examples of org.glassfish.hk2.external.org.objectweb.asm.MethodVisitor.visitLdcInsn()

        String clsName = classOptimizer.clsName;
        mv.visitFieldInsn(GETSTATIC, clsName, fieldName, "Ljava/lang/Class;");
        Label elseLabel = new Label();
        mv.visitJumpInsn(IFNONNULL, elseLabel);
        mv.visitLdcInsn(ldcName.replace('/', '.'));
        mv.visitMethodInsn(INVOKESTATIC, clsName, "class$",
                "(Ljava/lang/String;)Ljava/lang/Class;");
        mv.visitInsn(DUP);
        mv.visitFieldInsn(PUTSTATIC, clsName, fieldName, "Ljava/lang/Class;");
        Label endLabel = new Label();
View Full Code Here

Examples of org.mvel2.asm.MethodVisitor.visitLdcInsn()

            mv = cw.visitMethod( ACC_PUBLIC, "toString", "()" + Type.getDescriptor( String.class ), null, null );
            mv.visitCode();
            mv.visitTypeInsn( NEW, Type.getInternalName( StringBuilder.class ) );
            mv.visitInsn( DUP );
            mv.visitMethodInsn( INVOKESPECIAL, Type.getInternalName( StringBuilder.class ), "<init>", "()V" );
            mv.visitLdcInsn( "(@" + proxy + ") : " );
            mv.visitMethodInsn( INVOKEVIRTUAL, Type.getInternalName( StringBuilder.class ), "append", "(" + Type.getDescriptor( String.class ) + ")" + Type.getDescriptor( StringBuilder.class ) );
            mv.visitVarInsn( ALOAD, 0 );
            mv.visitMethodInsn( INVOKEVIRTUAL, BuildUtils.getInternalType( proxy ), "getFields", "()" + Type.getDescriptor( Map.class ) );
            mv.visitMethodInsn( INVOKEINTERFACE, Type.getInternalName( Map.class ) , "entrySet", "()" + Type.getDescriptor( Set.class ) );
            mv.visitMethodInsn( INVOKEVIRTUAL, Type.getInternalName( Object.class ), "toString", "()" + Type.getDescriptor( String.class ));
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor.visitLdcInsn()

      String gDesc = "()" + desc;
      CodeVisitor gv =
        cv.visitMethod(ACC_PRIVATE, "_get" + name, gDesc, null, null);
      gv.visitFieldInsn(GETSTATIC,
        "java/lang/System", "err", "Ljava/io/PrintStream;");
      gv.visitLdcInsn("_get" + name + " called");
      gv.visitMethodInsn(INVOKEVIRTUAL,
        "java/io/PrintStream", "println", "(Ljava/lang/String;)V");
      gv.visitVarInsn(ALOAD, 0);
      gv.visitFieldInsn(GETFIELD, owner, name, desc);
      gv.visitInsn(t.getOpcode(IRETURN));
View Full Code Here

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

      mv.visitEnd();
    }
    mv = cv.visitMethod(ACC_PUBLIC, "m", "()V", null, null);
    if (mv != null) {
      mv.visitCode();
      mv.visitLdcInsn(new Long(100));
      mv.visitMethodInsn(INVOKESTATIC, "java/lang/Thread", "sleep",
          "(J)V");
      mv.visitInsn(RETURN);
      mv.visitMaxs(3, 1);
      mv.visitEnd();
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.