The primed state of a plugin needs to be handled with special care to correctly transition from the primed stated to the activated state, and also not activate the plugin to early.
Since the intent of the primed state is to give plugins an opportunity to perform tasks without requiring the whole thing to be activated (i.e. filtering, decorating, uninstalling, ...) it may make sense to require the plugin to package is "prime code" into specifics jar that will be tagged as primed. The tagging (that could be handled in the plugin.xml by tagging the library) with the help of the classloader will then help to know whether or not the plugin should be activated.
The transition from the primed state to the activated state would then be made automatically when the loading of a non-primed class (not contained into a prime jar) will be loaded.
Questions:
When a plugin is primed, is the "plugin" instance created?
Can a user ask for the plugin instance and only get the plugin primed (PluginDescriptor::getPlugin() with an extra parameter)?