Package org.apache.tapestry5.internal.plastic.asm

Examples of org.apache.tapestry5.internal.plastic.asm.MethodVisitor.visitMethodInsn()


                    exceptions);
            return new MethodVisitor(Opcodes.ASM5, mv) {
                @Override
                public void visitCode() {
                    super.visitCode();
                    mv.visitMethodInsn(Opcodes.INVOKESTATIC, clsName,
                            "_clinit_", "()V", false);
                }
            };
        }
View Full Code Here


            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2,
                    "java/lang/ClassNotFoundException");
            mv.visitLabel(l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Class",
                    "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
            mv.visitLabel(l1);
            mv.visitInsn(Opcodes.ARETURN);
            mv.visitLabel(l2);
            mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
View Full Code Here

            mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Class",
                    "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
            mv.visitLabel(l1);
            mv.visitInsn(Opcodes.ARETURN);
            mv.visitLabel(l2);
            mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
                    "java/lang/ClassNotFoundException", "getMessage",
                    "()Ljava/lang/String;", false);
            mv.visitVarInsn(Opcodes.ASTORE, 1);
            mv.visitTypeInsn(Opcodes.NEW, "java/lang/NoClassDefFoundError");
            mv.visitInsn(Opcodes.DUP);
View Full Code Here

                    "()Ljava/lang/String;", false);
            mv.visitVarInsn(Opcodes.ASTORE, 1);
            mv.visitTypeInsn(Opcodes.NEW, "java/lang/NoClassDefFoundError");
            mv.visitInsn(Opcodes.DUP);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                    "java/lang/NoClassDefFoundError", "<init>",
                    "(Ljava/lang/String;)V", false);
            mv.visitInsn(Opcodes.ATHROW);
            mv.visitMaxs(3, 2);
            mv.visitEnd();
View Full Code Here

                        null, null);
            }
            for (String ldcName : syntheticClassFields) {
                String fieldName = "class$" + ldcName.replace('/', '$');
                mv.visitLdcInsn(ldcName.replace('/', '.'));
                mv.visitMethodInsn(Opcodes.INVOKESTATIC, clsName, "class$",
                        "(Ljava/lang/String;)Ljava/lang/Class;", false);
                mv.visitFieldInsn(Opcodes.PUTSTATIC, clsName, fieldName,
                        "Ljava/lang/Class;");
            }
            mv.visitInsn(Opcodes.RETURN);
View Full Code Here

    {

        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, PlasticInternalUtils.toInternalName(superClassName), "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitEnd();
    }

View Full Code Here

        // Add default constructor

        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, baseClassInternalName, "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();

        cw.visitEnd();
View Full Code Here

        // Add default constructor

        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();

View Full Code Here

        // Add default constructor

        MethodVisitor mv = cw.visitMethod(ACC_PROTECTED, "<init>", "()V", null, null);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();

        // Notice the  class is abstract, so no implementation.
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.