On 6/17/07, Mike Edwards <[EMAIL PROTECTED]> wrote:

<snip>

The component name may be nothing like the implementation name


How does that fit with the spec saying - ""A component type file has the
same name as the implementation file but has the extension ".componentType""
? I'm looking for a way to make the default case easy, it doesn't have to
deal with every edge case.

The componentType file is really to be thought of as an extension of the
implementation for those (hopefully few) cases where introspection of
the implementation cannot provide the required information.


Maybe "implementationType" would have been be a better name :-)

My suggestion is that the SPI should put the burden on the
implementation module - for example a special method on the
xxxImplementation class with a name like "locateComponentTypeFile".
Actual loading of the componenttype file can be generic, but finding the
file is definitely a job for the implementation-handling code.


The problem with this is some don't want the simple xxxImplementation class
to even be implementing any interface so ideally as much generic function
would be built in the runtime, and thats what I'm trying to find a way of
doing.

I was wondering if the contribution service could help here. It could
discover all the .componentType files in a contribution making their names
available,  the values of all the attributes of the xxxImplementation class
are also known so it could compare  all the attribute values against all the
found .componentType file names ignoring the file extension and when there's
a match thats the .componentType for the implementation. How does that
sound?

   ...ant

Reply via email to