On 23 August 2012 20:30, Andrea Aime <andrea.a...@geo-solutions.it> wrote:
> it would be nice to have an SPI for that too, maybe have the factory lookup in
> META-INF/services and look up the class names, but not going through the
> official SPI where you actually get a single instance of the class, just do 
> something
> that looks like SPI but just fetches class names. Or have something scanning 
> the
> classpath in a particular package looking for the annotations, just like
> Hibernate does.
> Anyways, just an idea

I like the sound of this idea very much. For a work project that
involves something a little bit similar to processes, I've been
experimenting with the NetBeans Lookup (which can be used outside of
NetBeans as just another maven dependency) to scan the classpath for
available implementations. You can ask the NB Lookup to return a list
of Classes rather than instances, and then do runtime annotation
processing on the chosen class.

However it's done, it would indeed be great to have a plug-in approach
rather than being forced to hack factories.

Michael

PS. many thanks Justin for all the work

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to