Suppose we have a type hierarchy, e.g. as depicted below. It is a well-defined tree, where each node has one parent (except for the root).
Each type has an action associated with it, that should be called upon successful matching.
What are intelligent ways to match objects against a type hierarchy? Each object should be matched against the most specific type possible.
Aucun commentaire:
Enregistrer un commentaire