Adrian Brock abrock at REDHAT.COM
Thu Jun 12 05:52:33 PDT 2008

I agree, getType() looks wrong to me
(not very object orientated ;-)

But I'm not sure that the spec should define import module and package
as explicit subclasses or that Import[Dependency] should be a 
concrete class?

I'd prefer to see interfaces. The factory methods would
just construct implementations of those interfaces.

Somebody else would be free to implement them in a different way,
e.g. as a wrapper/adapter to the equivalent manifest information of a
291 implementation.

On Wed, 2008-06-11 at 13:11 -0700, Bryan Atsatt wrote:
> 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
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat

More information about the jsr277-eg-observer mailing list