Re: Defining a constructor in an Interface
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 13:32:40 +0200
Lee Fesperman wrote:
Nope, it's still a bad idea. A decent implementation is likely to want additional arguments to its constructor. It pretty much kills multiple inheritance of interfaces because of conflicting constructor requirements. If your implementation wishes to extend another class with specific constructor requirements, you have no recourse.
There is more. Google for previous discussions on this.
I am not saying it is a good idea. I am just saying that I don't agree with Chris' claim:
That said, I don't think there's ever a good excuse for requiring a constructor that takes parameters.
/Thomas
-- The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/ .
- References:
- Defining a constructor in an Interface
- From: Chris Berg
- Re: Defining a constructor in an Interface
- From: Chris Smith
- Re: Defining a constructor in an Interface
- From: Thomas Weidenfeller
- Re: Defining a constructor in an Interface
- From: Lee Fesperman
- Defining a constructor in an Interface
- Prev by Date: loading jvm (libjvm.so) and setting LD_LIBRARY_PATH
- Next by Date: Re: Defining a constructor in an Interface
- Previous by thread: Re: Defining a constructor in an Interface
- Next by thread: Re: Defining a constructor in an Interface
- Index(es):