Which translator shows the above behaviour?
The CollectorVisitor was changed to be a subclass of HierarchyVisitor. This wasn't considered a breaking change though as the results from the static CollectorVisitor methods should not be different. In 7.3 the CollectorVisitor is not intended for use without a DelegatingHierarchyVisitor. The various behaviors can be summarized as:
7.3 CollectorVisitor.acceptVisitor(...) - collects only the top level object if it matches. This is really just an instanceof check.
7.3 using a DelegatingHierarchy visitor or the CollectorVisitor.collectObjects(Class, LanguageObject) static method - returns all AndOr instances, which in your example would be 3 - the top level and the 2 children.
7.6 CollectorVisitor.acceptVisitor(...) - collects only the matching children of the top level object, which is what you show above with the 2 results.
7.6 CollectorVisitor.collectObjects(Class, LanguageObject) static method - same as 7.3, returns all 3 instances.
I hope this makes more sense. We can update the javadoc to clarify the usage if needed.
Thanks Steve, that looks just like whats happening and I'll change my translator accordingly.