Article View: borland.public.jbuilder.java.language
Article #7629Re: Singleton Pattern: Use All Static Methods or Private Constructor?
From: John McGrath TeamB
Date: Thu, 31 May 2001 09:30
Date: Thu, 31 May 2001 09:30
19 lines
1523 bytes
1523 bytes
On Wed, 30 May 2001 13:09:44 -0500, "Jack Frosch" <jackfrosch[NO SPAM]
@mail.com> wrote:
> I'm not sure what you mean by, "it cannot expose implementation
> of an interface."
With approach #2, your class can implement an interface, and a
reference to the singleton instance of that class can be passed to
methods that require that interface type. This is not possible with
approach #1.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.157fadba9f13054498a248@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!logbridge.uoregon.edu!netnews.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b128359$1_1@dnews> <ud78segdn.fsf@sds.no> <3b1537a2$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,604521ee4b628609 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-31 02:44:15 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language Subject: Re: Singleton Pattern: Use All Static Methods or Private Constructor? Date: Thu, 31 May 2001 05:30:00 -0400 Message-ID: <MPG.157fadba9f13054498a248@forums.borland.com> References: <3b128359$1_1@dnews> <ud78segdn.fsf@sds.no> <3b1537a2$1_1@dnews> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 991301400 209.92.40.60 (31 May 2001 02:30:00 -0700) Lines: 19 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!logbridge.uoregon.edu!netnews.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews