Questions tagged [visitor-pattern]

The visitor design pattern is a way of separating an algorithm from an object structure on which it operates. A practical result of this separation is the ability to add new operations to existing object structures without modifying those structures.

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
155 views

Chaining JSON transformations with visitors

I have currently two use-cases that require JSON transformations before it can be deserialized. The first use-case requires changing the custom short type property name from ...
3
votes
0answers
172 views

Using the visitor pattern to compose notifications

I'm solving the following problem using the Visitor design pattern in Swift: When a quote is requested or an appointment is booked we send out an email to the customer, and build an internal ...
1
vote
0answers
45 views

AST Visitor Pattern in Java

I am trying to make a simple expression evaluator in Java using Jacc (a parser generator). I am done with the AST creation and now need to create an evaluator. For this I made a simple test to try to ...