On 24/11/2020 12:55, Alex Orlov wrote:
Oh, I seem to get it finally. Thank everyone for help, because I like to 
understand everything I work with.
Up to now when I used "provider()" I asked myself — what the provider was.
But could anyone explain, why the folder, in META-INF with provider names is called "services"? I mean
META-INF/services. We do create this folder and its content to give service 
implementations (i.e. providers),
but not to inform, that there are the following service interfaces.
Calling the dir services make sense if you view the META-INF dir/file tree as a schema (which is essentially what the jar's zip file system is hijacked to do)

The services folder groups all files, i.e. schema leaf nodes, whose name identifies a service (well, actually it names a Java interface or abstract class but that essentially represents a service as a Java API).

The contents of each service file provides details of the service by listing available providers i.e. names of classes which can be loaded and instantiated to implement the interface/abstract class.

regards,


Andrew Dinn
-----------

Reply via email to