🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15646

Re: limmiting the number of instances in java

#15646
From: Tor Iver Wilhelmsen
Date: Wed, 19 May 1999 00:00
15 lines
1228 bytes
"Omer Azhar Qureshi" <oaq@systemeltd.com.pk> writes:

> ive tried this already but it dosent stop the instance of the class to be
> made using the new operator...

It should reduce the cases where 'new' can be used to subclasses,
itself and classes in the same package... The problem is that Java
needs a visibility modifier that allows acces to class and subclass
only, and _not_ to package.

> isnt there a workaround for that????

Sort of - I believe wehat I posted is the closest you get, or if the
singleton class need not be subclassed (remember: Patterns don't need
to be explicit classes of the pattern'sname), you can make it private.
Technical Details
Message-ID: <uogjho4qe.fsf@sds.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7hr7ck$bif3@forums.borland.com> <uiu9qkcis.fsf@sds.no> <7hrh6c$bie19@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,88037c7ffe1531f
X-Google-Attributes: gidf74b3,public
From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Subject: Re: limmiting the number of instances in java
Date: 1999/05/19
Message-ID: <uogjho4qe.fsf@sds.no>
X-Deja-AN: 479544267
Sender: towi@SDSA1761
References: <7hr7ck$bif3@forums.borland.com> <uiu9qkcis.fsf@sds.no> <7hrh6c$bie19@forums.borland.com>
Supersedes: <uyailo9fj.fsf@sds.no>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language