gof-visitor-double-dispatch-via-accept

Status: IN

In the Visitor pattern, when an element accepts a visitor, it calls a visitor method that encodes the element's class (e.g., ElementA.Accept calls visitor.VisitElementA(this)), implementing double dispatch — Accept dispatches on element type, then the Visit call dispatches on visitor type.

Source: entries/2026/06/17/gof-oo-chunk-21.md

Depended on by

JSON