Johan Compagner wrote:
> maybe we shouldn't store the class itself at all:
> 
>         Map getAndSetters = (Map)classesToGetAndSetters.get(clz);
>         if (getAndSetters == null)
>         {
>             getAndSetters = new ConcurrentHashMap(8);
>             classesToGetAndSetters.put(clz, getAndSetters);
>         }
> 
> but do put(clz.getName(), getAndSetters)
> 
> 
> hmm, on second hand that wont help a bit, because we need to keep 
> references to fields and methods anyway.

Yeah, this was my rationale - it makes all the look-ups much slower, and 
if you WeakReference or String-reference the class, you need to build a 
custom key for method signatures and all the rest of it (Methods and 
Fields can't be WeakReferences as they'll be garbage collected behind 
your back).

Going back to Jonathan's original unit test case, I'm thinking maybe we 
can lazy-init this to make unit testing more bearable.

Otherwise you need to have an MockApplication, etc.

<stage directions: Al goes off to make it so... />

Al
-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to