Patterns: Be independent of different subclasses by passing an Object array to the constructor
问题 Let's say I load a whole lot of entities from a file. Most of these entities (Not all of them) are of a different class type, and thus may (Or may not) have a different constructor. However, all of them share one superclass: Entity.class How bad/good is it to let the superclass have one constructor public Entity(Object[] args); , so that the arguments will simply also be loaded from file and passed to the constructor, where the constructor then sorts out what exactly to do with that array?