This is a class diagram example for the Visitor pattern.


Allows for one or more operations to be applied to a set of objects at runtime, decoupling the operations from the object structure.

Use When

  • An object structure must have many unrelated operations performed upon it.
  • The object structure can't change but operations performed on it can.
  • Operations must be performed on the concrete classes of an object structure.
  • Exposing internal state or operations of the object structure is acceptable.
  • Operations should be able to operate on multiple object structures that implement the same interface sets.
Import into your Project

Posted by: Shalonda Moran

Turn every software project into a successful one.

Try Visual Paradigm for Free! Or learn more about our features.

0 0 vote
Article Rating
Inline Feedbacks
View all comments