All Questions
2 questions
6
votes
9
answers
2k
views
Java instanceof and Clean architecture
It seems to me that there is a conflict between clean architecture and the recommendation not to use instanceof. Consider the following code:
class ParentEntity {
}
class AEntity extends ParentEntity ...
0
votes
1
answer
2k
views
Java convention - Implementing two similar functions for two different objects
I have two classes, let's call them Foo and Bar. They both extend different classes (Foo extends X, Bar extends Y), which have some common ancestor "way up" the inheritance tree, something like this:
...