The design of this class seems broken to me with the addition of two "types". Why not:

1. Make ImportDependency abstract, removing the getType() and newX methods.
2. Make ImportPackage and ImportModule subclasses, each with their own newX method.

(I also strongly suggest that we rename ImportDependency to simply "Import" :^)

This model also obviously enables new subtypes, an extensibility point that may come in handy in the future.

// Bryan

Reply via email to