MethodVisitor (int access, String name, String descriptor, String signature, String[] exceptions) { return new MethodVisitor(Opcodes.API_VERSION) { @Override public void visitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface) { if (name.equals(methodName)) { contains.set(Boolean.TRUE); } } }; }