Say you're dealing with classes that extend org.dingbat.AbstractWidgetFactory.
In any jar which contains concete implementations you place a text file called
META_INF/services/org.dingbat.AbstractWidgetFactory
In this file you put the FQNs of the implementing classes, one per line (usual # comment convention applies).
When the getInstance() method of AbstractWidgetFactory is called it does getResources() to find all such service files on the class path, reads them, loads the classes, and then picks one to use.