有没有办法实现访客设计模式没有循环依赖?我的意思是访客需要一个访问对象.并且访问对象需要访问者接受.最终两者都相互依赖. 再找到它!查看 Acyclic Visitor: 引用: Allow new func
引用:
Allow new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the troublesome dependency cycles that are inherent to the GOF VISITOR Pattern.