re-
blessing doesn't mean you violate parent-knowledge behavior. In fact, Policy, Manifest, and/or Factory classes would be a better way of doing this.
- Create a file object.
- The file object, during construction, finds out it's a directory.
- The file object will then either:
- Ask the Factory to for the classname to rebless to
- Give itself to the Factory and asks to be reblessed
The factory or policy or manifest should be the one that maintains that knowledge and how to transform.
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.