Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-24 Thread Alex Orlov
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

Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-24 Thread Alex Orlov
>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

Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-24 Thread Alex Orlov
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

Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread Alex Orlov
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

Re[2]: Why service provider method is called "provider", but not "provide"?

2020-11-23 Thread Alex Orlov
> 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