public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return cv.visitMethod(access, name, desc, signature, exceptions); }
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return target.visitMethod(access, name, desc, signature, exceptions); }
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return cv.visitMethod(access, name, desc, signature, exceptions); }
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv1 = cv1.visitMethod(access, name, desc, signature, exceptions); MethodVisitor mv2 = cv2.visitMethod(access, name, desc, signature, exceptions); if (mv1 == null) return mv2; if (mv2 == null) return mv1; return new MethodVisitorTee(mv1, mv2); }
@Override public MethodVisitor visitMethod(int access, String mtdName, String mtdDesc, String mtdSig, String[] exceptions) { String defMtd = className + ":" + mtdName + ":" + mtdDesc; if (!refMtdSet.contains(defMtd)) { refMtdSet.add(defMtd); methodCount++; } MethodVisitor mv = super.visitMethod(access, mtdName, mtdDesc, mtdSig, exceptions); mv = new MethodVisitor(Opcodes.ASM4, mv) { @Override public void visitFieldInsn(int opcode, String owner, String fName, String fDesc) { String invokeField = owner + ":" + fName + ":" + fDesc; if (!refFieldSet.contains(invokeField)) { refFieldSet.add(invokeField); fieldCount++; } super.visitFieldInsn(opcode, owner, fName, fDesc); } @Override public void visitMethodInsn(int opcode, String owner, String mName, String mDesc) { String invokeMtd = owner + ":" + mName + ":" + mDesc; if (!refMtdSet.contains(invokeMtd)) { refMtdSet.add(invokeMtd); methodCount++; } super.visitMethodInsn(opcode, owner, mName, mDesc); } }; return mv; }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return wrap(super.visitMethod(access, name, desc, signature, exceptions)); } };
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { boolean bridge = (access & ACC_BRIDGE) != 0 && (access & ACC_SYNTHETIC) != 0; if (bridge && bridgeMethod.getName().equals(name) && getParameterCount(desc) == bridgeMethod.getParameterTypes().length) { return new MethodFinder(methodSignature); } return super.visitMethod(access, name, desc, signature, exceptions); } }, 0);
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return (filter.accept(access, name, desc, signature, exceptions) ? pass : direct).visitMethod(access, name, desc, signature, exceptions); }
private static void implementProxy(ClassVisitor classVisitor, Class<?> iFace, String generatedName) { MethodVisitor methodVisitor = classVisitor.visitMethod(Opcodes.ACC_PUBLIC, "proxy", methodDescriptor(iFace), null, null); methodVisitor.visitCode(); methodVisitor.visitVarInsn(Opcodes.ALOAD, LOCALS_INDEX_THIS); methodVisitor.visitInsn(Opcodes.ARETURN); methodVisitor.visitMaxs(-1, -1); methodVisitor.visitEnd(); implementBridgeMethod(classVisitor, generatedName, "proxy", iFace); }
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { if (signature!=null) signatures.put(name+desc,signature); return super.visitMethod(access, name, desc, signature, exceptions); }
@Override public MethodVisitor visitMethod(int access, String methodName, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, methodName, desc, signature, exceptions); if (!hasChannelDescriptor || mv == null) { return mv; } if ("write".equals(methodName) && AsmUtil.isPublic(access)) { return new LettuceMV(access, desc, className, mv); } return mv; } }
@Override public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { Printer p = this.p.visitMethod(access, name, desc, signature, exceptions); MethodVisitor mv = cv == null ? null : cv.visitMethod(access, name, desc, signature, exceptions); return new TraceMethodVisitor(mv, p); }
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { if (name.equals("defineClass")) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); return new DefineClassInterceptor(mv); } else { return super.visitMethod(access, name, desc, signature, exceptions); } }
@Override public MethodVisitor visitMethod(int access, String methodName, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, methodName, desc, signature, exceptions); if (mv == null) { return mv; } if (AsmUtil.isSpecial(methodName)) { return mv; } return new SpringReqMapMV(className, access, methodName, desc, mv); }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null || mset.isA(name, desc) == false) { return mv; } return new UserExceptionConsturtorMV(className, desc, mv); } }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null || mset.isA(name, desc) == false) { return mv; } if (AsmUtil.isSpecial(name)) { return mv; } return new StartAsyncMV(access, desc, mv); } }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null || mset.isA(name, desc) == false) { return mv; } if (AsmUtil.isSpecial(name)) { return mv; } return new HystrixCommandReceiveMV(access, name, desc, mv); } }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null || mset.isA(name, desc) == false) { return mv; } if (AsmUtil.isSpecial(name)) { return mv; } return new SendCommandMV(access, name, desc, mv); } }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null || mset.isA(name, desc) == false) { return mv; } if (AsmUtil.isSpecial(name)) { return mv; } return new DoSubmitMV(access, desc, mv); } }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null || mset.isA(name, desc) == false) { return mv; } if (AsmUtil.isSpecial(name)) { return mv; } return new HystrixCommandPrepareMV(access, name, desc, mv); } }