Skip to content

Commit 4023944

Browse files
committed
Adding README.md file
1 parent 17164c2 commit 4023944

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

acyclic-visitor/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: pattern
3+
title: Acyclic Visitor
4+
folder: acyclic-visitor
5+
permalink: /patterns/acyclic-visitor/
6+
categories: Behavioral
7+
tags:
8+
- Java
9+
- Difficulty-Intermediate
10+
---
11+
12+
![alt text](./etc/acyclic-visitor.png "Acyclic Visitor")
13+
14+
## Intent
15+
Allow new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the troublesome dependency cycles that are inherent to the GOF VISITOR Pattern.
16+
17+
## Applicability
18+
This pattern can be used:
19+
* When you need to add a new function to an existing hierarchy without the need to alter or affect that hierarchy.
20+
* When there are functions that operate upon a hierarchy, but which do not belong in the hierarchy itself. e.g. the ConfigureForDOS / ConfigureForUnix / ConfigureForX issue.
21+
* When you need to perform very different operations on an object depending upon its type.
22+
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class.
23+
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive.
24+
25+
## Related patterns
26+
* [Visitor Pattern](../visitor/README.md)
27+
28+
## Credits
29+
* [Acyclic Visitor](http://condor.depaul.edu/dmumaugh/OOT/Design-Principles/acv.pdf)

0 commit comments

Comments
 (0)