Package org.ow2.easybeans.asm

Examples of org.ow2.easybeans.asm.ClassWriter.visitMethod()


                String name,
                String desc,
                String signature,
                String[] exceptions)
            {
                final MethodVisitor next = cv.visitMethod(access,
                        name,
                        desc,
                        signature,
                        exceptions);
                if (next == null) {
View Full Code Here


                final String name,
                final String desc,
                final String signature,
                final String[] exceptions)
            {
                MethodVisitor mv = cv.visitMethod(access,
                        name,
                        desc,
                        signature,
                        exceptions);
                return new AnalyzerAdapter(owner, access, name, desc, mv);
View Full Code Here

    public void testIllegalMethodSignature() {
        ClassVisitor cv = new CheckClassAdapter(new EmptyVisitor());
        cv.visit(V1_1, ACC_PUBLIC, "C", null, "java/lang/Object", null);
        try {
            cv.visitMethod(ACC_PUBLIC, "m", "()V", "<T::LI.J<*+LA;>;>()V^LA;X", null);
            fail();
        } catch (Exception e) {
        }
    }

View Full Code Here

                String name,
                String desc,
                String signature,
                String[] exceptions)
            {
                final MethodVisitor next = cv.visitMethod(access,
                        name,
                        desc,
                        signature,
                        exceptions);
                if (next == null) {
View Full Code Here

                final String name,
                final String desc,
                final String signature,
                final String[] exceptions)
            {
                MethodVisitor mv = cv.visitMethod(access,
                        name,
                        desc,
                        signature,
                        exceptions);
                return new AnalyzerAdapter(owner, access, name, desc, mv);
View Full Code Here

        ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
        ClassVisitor cv = new StaticInitMerger("$clinit$", cw);
        cv.visit(V1_1, ACC_PUBLIC, "A", null, "java/lang/Object", null);
        cv.visitField(ACC_PUBLIC + ACC_STATIC, "counter", "I", null, null);
        for (int i = 0; i < 5; ++i) {
            MethodVisitor mv = cv.visitMethod(ACC_PUBLIC,
                    "<clinit>",
                    "()V",
                    null,
                    null);
            mv.visitFieldInsn(GETSTATIC, "A", "counter", "I");
View Full Code Here

            mv.visitInsn(IADD);
            mv.visitFieldInsn(PUTSTATIC, "A", "counter", "I");
            mv.visitInsn(RETURN);
            mv.visitMaxs(0, 0);
        }
        MethodVisitor mv = cv.visitMethod(ACC_PUBLIC,
                "<init>",
                "()V",
                null,
                null);
        mv.visitVarInsn(ALOAD, 0);
View Full Code Here

        cw.visitInnerClass("pkg/Outer$1", null, null, 0);

        fv = cw.visitField(ACC_PRIVATE + ACC_DEPRECATED, "i", "I", null, null);
        fv.visitEnd();

        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(0, 0);
View Full Code Here

        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_DEPRECATED, "m", "()V", null, null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "pkg/Outer$1");
        mv.visitInsn(DUP);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL,
View Full Code Here

        mv.visitInsn(POP);
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_STATIC + ACC_SYNTHETIC,
                "access$000",
                "(Lpkg/Outer;)I",
                null,
                null);
        mv.visitCode();
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.