Article View: borland.public.jbuilder.java.language
Article #7719Re: Singleton Pattern: Use All Static Methods or Private Constructor?
From: Jack Frosch
Date: Wed, 30 May 2001 18:09
Date: Wed, 30 May 2001 18:09
23 lines
1624 bytes
1624 bytes
Tor, Would you please elaborate a bit on your response? I'm not sure what you mean by, "it cannot expose implementation of an interface." (I fear lost the antecedent to "that approach") Thanks. Jack "Tor Iver Wilhelmsen" <tor.wilhelmsen@sds.no> wrote in message news:ud78segdn.fsf@sds.no... > "Jack Frosch" <jackfrosch[NO SPAM]@mail.com> writes: > > > Approach #2 clearly meets the pattern description of the GoF, but I'm > > wondering if there are any uniquely-Java reasons why approach #1 might be > > preferable? > > Well, that approach is closer to the Utility pattern. For instance, it > has the disadvantage that it cannot expose implementation of an > interface.
Technical Details
Message-ID:
<3b1537a2$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b128359$1_1@dnews> <ud78segdn.fsf@sds.no>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-30 11:21:52 PST From: "Jack Frosch" <jackfrosch[NO SPAM]@mail.com> Newsgroups: borland.public.jbuilder.java.language References: <3b128359$1_1@dnews> <ud78segdn.fsf@sds.no> Subject: Re: Singleton Pattern: Use All Static Methods or Private Constructor? Date: Wed, 30 May 2001 13:09:44 -0500 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: 65.64.149.49 Message-ID: <3b1537a2$1_1@dnews> X-Trace: dnews 991246242 65.64.149.49 (30 May 2001 11:10:42 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews