If I understand correctly, you are using this code in a superclass to check if the subclass has a testVariable class.
Why don't you just add such a method?
protected boolean hasTestVariableField() { return false; }
It seems to me a lot more OO, does not break encapsulation.
However, I really did not understand why you need this in the first place.
JB Nizet Jul 08 '11 at 20:26 2011-07-08 20:26
source share