How can I avoid switch or chained ifs, if I don't want to subclass for design reasons? Specifically, in my model I have already a type hierarchy consisting of a few classes that implement an interface. The interface represents a relation between two nodes and the classes represent different types of relations. Another class that does SQL generation has a list of relations and wants to do different
![Clean Code Talks - Inheritance, Polymorphism, & Testing](https://cdn-ak-scissors.b.st-hatena.com/image/square/6571391198fcb45e4d7c5cab7d90e5ca2fbf4605/height=288;version=1;width=512/http%3A%2F%2F2.bp.blogspot.com%2F-7bZ5EziliZQ%2FVynIS9F7OAI%2FAAAAAAAASQ0%2FBJFntXCAntstZe6hQuo5KTrhi5Dyz9yHgCK4B%2Fs1600%2Fgooglelogo_color_200x200.png)