While loading objects is quite nice, i find myself wanting a mix of objects and regular classes for some particular interface. This can be achieved right now by having an @Service and a regular java ServiceLoader in one. The ServiceLoader will then be filled (using AutoService, for example), while the objects will be loaded using the sweet spi service. Maybe it would be possible for the sweet spi to also already load objects from the regular service loader? That would also make it possible to implement sweet spi services from java. Even if that option is not an option, just allowing the plugin to generate instances for a service would be nice.
While loading objects is quite nice, i find myself wanting a mix of objects and regular classes for some particular interface. This can be achieved right now by having an
@Serviceand a regular javaServiceLoaderin one. TheServiceLoaderwill then be filled (using AutoService, for example), while the objects will be loaded using the sweet spi service. Maybe it would be possible for the sweet spi to also already load objects from the regular service loader? That would also make it possible to implement sweet spi services from java. Even if that option is not an option, just allowing the plugin to generate instances for a service would be nice.