Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Partially overriding a method? Date: Thu, 21 Apr 2011 12:59:11 -0700 Organization: Canadian Mind Products Lines: 24 Message-ID: References: Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3192 On Thu, 21 Apr 2011 08:31:46 -0700 (PDT), "raphfrk@gmail.com" wrote, quoted or indirectly quoted someone who said : >I was wondering if it is possible to override a method but only for >certain sub-classes of the method that the super-class supports. To get that sort of effect, create new methods with new names. You can "rescue" a method being overridden, to give access to the parent method, by creating a method with a new name or signature in the same class you overrode the base method that calls the parent method with super.xxxx. -- Roedy Green Canadian Mind Products http://mindprod.com Politicians complain that Kindles and iBooks are killing jobs by destroying the paper book industry. I see it that they have create a way to produce books for less than a third the cost without destroying forests and emitting greenhouse gases in the process. They have created wealth. They are encouraging literacy and cutting the costs of education.