You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Paulo Gaspar <pa...@krankikom.de> on 2001/09/11 12:38:21 UTC

RE: cvs commit:jakarta-velocity/src/java/org/apache/velocity/util/introspectionClassMap.java Introspector.java

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" <sz...@freemail.hu> 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
>