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
>The provider() method returns an instance of a class that provides a
>given service. provider() could be called serviceProvider() or
>serviceImplementor() - but providor() suffices.
Following this logic we can change hashCode() in Object to provider(). Because
it will return a value, that provi
Could you then explain the difference between service and service provider? As
I understand
you’re saying they are the same. I always thought, that they were two different
things. For example,
what we are talking about service factory/supplier/consumer we separate service
from
factory/supplier/
To tell the truth I didn’t use ServiceLoader.Provider. Please, consider the
following code:
module msg.service.provider.swing {
..
provides service.api.AService with service.provider.TheServiceProvider;
...
}
...
public class TheServiceProvider {
public static AService pr
> The method does return a "provider". It returns the object that is an
> instance of a class that provides the service - hence that object is a
> provider.
I don’t agree with that. It returns the object that is an instance of the
service.
--
Best regards, Alex Orlov
>Понедельник, 23 н