Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #36427

Re:Reuse naming *Provider in other classes

From omegajunior <omegajunior@protonmail.com>
Newsgroups comp.lang.java.programmer
Subject Re:Reuse naming *Provider in other classes
Date 2017-04-03 23:21 -0400
Organization nntp.aioe.org
Message-ID <obv3gf$15k3$1@gioia.aioe.org> (permalink)
References <c5d8020b-2092-45c0-b0ad-377923357d6a@googlegroups.com>

Show all headers | View raw


mike <mikaelpetterson@hotmail.com> Wrote in message:
> Hi,
> 
> We have XXProvider,YYYProvider interfaces in our application. They all extend the same interface called Provider that extends interface A.
> 
> Now we have another interface B that provides functionality but it cannot extend class A.
> 
> 
> These are the option I can come up with:
> 
> 1. Still call it BProvider but not extend Provider
> 2. Use other naming, BSupplier 
> 
> 
> Comments? Other options?
> 
> br,
> 
> //mike
> 

Why is interface B unable to extend Provider? 
  
If B is more of an abstract implementation, make it an abstract
 class, implementing Provider, and have sub classes extend B.
 
  
I tend to prefix interface classes with I, and abstract ones with
 A. I've seen JDK and JRE classes suffixed Impl if they are an
 implementing sub class. 
-- 


----Android NewsGroup Reader----
http://usenet.sinaapp.com/

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Reuse naming *Provider in other classes mike <mikaelpetterson@hotmail.com> - 2017-03-10 04:24 -0800
  Re: Reuse naming *Provider in other classes Andreas Leitgeb <avl@logic.at> - 2017-03-10 12:37 +0000
    Re: Reuse naming *Provider in other classes mike <mikaelpetterson@hotmail.com> - 2017-03-10 05:29 -0800
  Re:Reuse naming *Provider in other classes omegajunior <omegajunior@protonmail.com> - 2017-04-03 23:21 -0400
    Re: Reuse naming *Provider in other classes lewbloch@gmail.com - 2017-04-06 02:44 -0700

csiph-web