Return-Path: Delivered-To: apmail-jakarta-velocity-dev-archive@jakarta.apache.org Received: (qmail 58702 invoked by uid 500); 11 Sep 2001 10:24:46 -0000 Mailing-List: contact velocity-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: velocity-dev@jakarta.apache.org Delivered-To: mailing list velocity-dev@jakarta.apache.org Received: (qmail 58692 invoked from network); 11 Sep 2001 10:24:45 -0000 Reply-To: From: "Paulo Gaspar" To: Subject: RE: cvs commit:jakarta-velocity/src/java/org/apache/velocity/util/introspectionClassMap.java Introspector.java Date: Tue, 11 Sep 2001 12:38:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Absolutely right! I started using a Map because I thought I would need to compare the stored Class somewhere. However, then I only needed to use the class name but did never remember turning the Map into a Set. I also like better the "cachedClassNames" name. Have fun, Paulo > -----Original Message----- > From: Geir Magnusson Jr. [mailto:geirm@optonline.net] > Sent: Tuesday, September 11, 2001 12:55 AM > To: velocity-dev@jakarta.apache.org > Subject: Re: cvs > commit:jakarta-velocity/src/java/org/apache/velocity/util/introspectionC > lassMap.java Introspector.java > > > On 9/10/01 6:09 AM, "Attila Szegedi" wrote: > > > "Map classByName" could as well be "Set cachedClassNames", storing only > > class names and using "cachedClassNames.contains(className)" instead of > > "classByName.get(name) != null". It can be somewhat confusing to code > > readers why do we store the class beside its name - we don't > use the stored > > class object anywhere. > > That's a good idea too... > > Lets beat on this a while first, then we can nip and tuck. > > geir > -- > Geir Magnusson Jr. geirm@optonline.net > System and Software Consulting > Developing for the web? See http://jakarta.apache.org/velocity/ > If you look up, there are no limits - Japanese Proverb >