Package org.more.asm

Examples of org.more.asm.MethodVisitor.visitCode()


        String findDesc = name + desc.substring(0, desc.lastIndexOf(")") + 1);
        this.validMethod.add(findDesc);
        //2.忽略构造方法,aop包装不会考虑构造方法。
        if (name.equals("<init>") == true) {
            MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
            mv.visitCode();
            this.visitConstruction(mv, name, desc);
            mv.visitEnd();
            return null;
        }
        return null;
View Full Code Here


                String desc = String.format("()%s", typeDesc);
                String testDesc = methodName + "()";
                //检测是否存在同名方法
                if (this.validMethod.contains(testDesc) == false) {
                    mv = super.visitMethod(ACC_PUBLIC, methodName, desc, null, null);
                    mv.visitCode();
                    this.buildGetMethod(mv, propertyName, typeDesc);
                    mv.visitEnd();
                }
            }
            if (property.isMarkWrite()) {
View Full Code Here

                String desc = String.format("(%s)V", typeDesc);
                String testDesc = String.format("%s(%s)", methodName, typeDesc);;
                //检测是否存在同名方法
                if (this.validMethod.contains(testDesc) == false) {
                    mv = super.visitMethod(ACC_PUBLIC, methodName, desc, null, null);
                    mv.visitCode();
                    this.buildSetMethod(mv, propertyName, typeDesc);
                    mv.visitEnd();
                }
            }
            //
View Full Code Here

            if (ASMEngineToos.checkIn(access, Modifier.NATIVE)) {
                access = access - Modifier.NATIVE;
            }
            //
            MethodVisitor mv = this.visitMethod(access, name, desc, signature, exceptions);
            mv.visitCode();
            this.visitProxyMethod(mv, name, desc);//输出新方法。
            mv.visitEnd();
        }
        //3.输出“$aopFun”方法
        for (Method targetMethod : this.aopMethodMap) {
View Full Code Here

            for (int i = 0; i < errors.length; i++) {
                exceptions[i] = ASMEngineToos.replaceClassName(errors[i]);
            }
            //
            MethodVisitor mv = this.visitMethod(access, AopPrefix + name, desc, signature, exceptions);
            mv.visitCode();
            this.visitAOPMethod(mv, name, desc);//输出新方法。
            mv.visitEnd();
        }
        //4.采集类本身的方法。
        Method[] methodSet2 = this.classConfig.getSuperClass().getDeclaredMethods();
View Full Code Here

        asmReturns = asmReturns.charAt(0) == 'L' ? asmReturns.substring(1, asmReturns.length() - 1) : asmReturns;
        //
        //2.忽略构造方法,aop包装不会考虑构造方法。
        if (name.equals("<init>") == true) {
            MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
            mv.visitCode();
            this.visitConstruction(mv, name, desc);
            mv.visitEnd();
            return null;
        }
        //2.兼容如果有其它ClassVisitor动态输出方法时不会影响到它。
View Full Code Here

        String findDesc = name + desc.substring(0, desc.lastIndexOf(")") + 1);
        this.validMethod.add(findDesc);
        //2.忽略构造方法,aop包装不会考虑构造方法。
        if (name.equals("<init>") == true) {
            MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
            mv.visitCode();
            this.visitConstruction(mv, name, desc);
            mv.visitEnd();
            return null;
        }
        return null;
View Full Code Here

                String typeDesc = String.format("%s(%s)", mName, ASMEngineToos.toAsmType(tMethod.getParameterTypes()));
                //
                if (this.validMethod.contains(typeDesc) == false) {
                    String desc = ASMEngineToos.toAsmDesc(tMethod);
                    MethodVisitor mv = super.visitMethod(ACC_PUBLIC, mName, desc, null, null);
                    mv.visitCode();
                    this.buildInterfaceMethod(mv, mName, desc, faceType);
                    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.