Article View: borland.public.jbuilder.java.language
Article #8412Re: Is "return super;" a valid statement
From: Hartmut
Date: Tue, 20 Mar 2001 07:40
Date: Tue, 20 Mar 2001 07:40
22 lines
1903 bytes
1903 bytes
"Ralph Quapp" <-> schrieb im Newsbeitrag news:3ab6816f_1@dnews... > Ok, the example was a bit to simple or I did not explain the intended use > well enough: > > In fact I want to return a reference to an instance of class A, only. Class > B was only intended to prepare class A for a specific usage, and it is not > intended to be used any further. I therefore wanted to 'remove' the B part > of the instance. But probably - even when it would be a valid construct - it > would not work as it still will behave polymorphic (tested with JBuilder). I'd suggest to put the B features into a class (call it "C") that does not extend calls A, but an A object has an optional aggregation to a C object. After the C object has done its work, the A object can set its C reference to null. So your A object has the C features only temporarily and then forgets them. Is this, what you wanted? Regards, Hartmut
Technical Details
Message-ID:
<3ab70bbb_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!217.3.246.116References:
<3ab26402$1_1@dnews> <MPG.151cdabe37c2b74f98a084@forums.borland.com> <MPG.151df2148cd2b2f398a08a@forums.borland.com> <3ab6816f_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a2b6df84216d25a2 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-23 03:46:05 PST From: "Hartmut" <hartmut.kiessling@bnhof.de> Newsgroups: borland.public.jbuilder.java.language References: <3ab26402$1_1@dnews> <MPG.151cdabe37c2b74f98a084@forums.borland.com> <MPG.151df2148cd2b2f398a08a@forums.borland.com> <3ab6816f_1@dnews> Subject: Re: Is "return super;" a valid statement Date: Tue, 20 Mar 2001 08:40:35 +0100 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 217.3.246.116 Message-ID: <3ab70bbb_1@dnews> X-Trace: 19 Mar 2001 23:50:19 -0800, 217.3.246.116 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!217.3.246.116