In fact, you can think of finding children on a per-type basis as a visitor operation that can be encapsulated in a visitor itself.
实际上,您可以将按照类型查找子节点的操作视为可封装在访问者自身中的访问者操作。
2
The Russian doll pattern defines all subelements locally; thus, each element and its type are encapsulated by their parent, much like the Russian dolls.