Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 46337 invoked from network); 4 Jan 2006 17:10:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jan 2006 17:10:47 -0000 Received: (qmail 16150 invoked by uid 500); 4 Jan 2006 17:10:41 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 16110 invoked by uid 500); 4 Jan 2006 17:10:40 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 16092 invoked by uid 99); 4 Jan 2006 17:10:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 09:10:39 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tomdzk@gmail.com designates 64.233.182.196 as permitted sender) Received: from [64.233.182.196] (HELO nproxy.gmail.com) (64.233.182.196) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 09:10:38 -0800 Received: by nproxy.gmail.com with SMTP id l36so1100477nfa for ; Wed, 04 Jan 2006 09:09:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lFN2+89sAYtcuzyiwNL8aEIGIC/zzFiUTqHirbeBNlWShHxu+WFBo+tyM3ZRnGL9aLev4GBMPdQTzvYBnxmoKBNsVPslflG/dGzWmH7gLHisvtvUK6BYp+1UIQY5zwLazgSTs8ir2QoiYOQYZW+Dk8cYASfyMHS29ieBZLau6Zk= Received: by 10.48.12.14 with SMTP id 14mr662190nfl; Wed, 04 Jan 2006 09:09:53 -0800 (PST) Received: by 10.48.250.15 with HTTP; Wed, 4 Jan 2006 09:09:53 -0800 (PST) Message-ID: <224f32340601040909q30acc209t42226fa212976d28@mail.gmail.com> Date: Wed, 4 Jan 2006 18:09:53 +0100 From: Thomas Dudziak To: Jakarta Commons Users List Subject: Re: Using internal classes with Digester and XMLRules In-Reply-To: <51669.170.201.180.136.1136391017.squirrel@webmail.chiron.lunarpages.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <36569.170.201.180.136.1136389798.squirrel@webmail.chiron.lunarpages.com> <200601041602.k04G2jON005295@home.hyperworx.com> <51669.170.201.180.136.1136391017.squirrel@webmail.chiron.lunarpages.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 1/4/06, Frank W. Zammetti wrote: > Anyone else, just out of curiosity, is there a "best practice" around > this? My feeling is that if I'm configuring an object that is only used > by a given class, i.e., Class foo has a collection of Class bar's that > will be created via Digester, and nothing outside foo uses bar, and then > making bar an inner class makes it a bit more obvious to me what its > purpose is and how it fits into the object schema, so to speak... althoug= h > one could argue that it represents coupling and therefore is bad... any > thoughts? You should use inner classes (non-static) only if they have a real tight coupling to the outer class, i.e. if they always need a outside instance (think: almost every method of the inner class would otherwise need an object of the outer class as parameter). Whether you prefer nested (static) classes or normal classes in the same package might depend on whether the nested class needs access to internals of the outer class (private methods) though one could argue that this is not a good design. Other than that it is probably a matter of personal style. But I tend to avoid static classes for the sole reason that they make the class bigger and less readable. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org