> On Mar 8, 2021, at 2:52 PM, Volkan Yazıcı <volkan.yaz...@gmail.com> wrote:
> 
> Thanks Matt! I have indeed spotted the following line:
> 
> // TODO: 2.2+ use this annotation for all @Plugin classes
> 
> Right now I am sitting on the fence whether I shall address my issue with
> extending the plugin system or rather implement a MySingletonBeanFactory
> interface extending from Comparable<MySingletonBeanFactory> and
> @Plugin-annotate those factories. Food for thought... It is 22:50 here,
> time to sleep.

That is the time I do my best work. ;-)

I’m not sure why you would want to annotate the factory. Generally the actual 
plugin class is annotated. The component that uses plugins finds the plugins 
for its category. Each Plugin category may use a different mechanism to load 
the plugin. For example, Lookups are created just by invoking new on the class, 
PatternConverters require a static newInstance method in the class, while core 
plugins require a PluginBuilder or static PluginFactory method.

Basically, the plugin system just provides you the information about the 
plugin. It never actually creates one.

Ralph

Reply via email to