On Thu, 2004-11-04 at 16:29 -0800, Daniel Rall wrote:
> On Thu, 2004-11-04 at 19:11 -0500, Scott Palmer wrote:
> > On Nov 4, 2004, at 6:24 PM, Daniel Rall wrote:
> >
> > > Scott, do not give up hope! You can implement a generic get(String)
> > > method which can provide this functionality in a dynamic fashion:
> > >
> > > public class Ident
> > > {
> > > public Client get(String name)
> > > {
> > > ...
> > > }
> > > }
> > >
> > > $ident.foo will map to Ident.get("foo"), which you can in turn have
> > > return your Client object. Here's a link to the gory details:
> >
> > But will it call me if 'foo' starts with a digit or is it already too
> > late by that point? I thought it was too late, since if I add a Map to
> > the context that has the string '0' (zero) as a key it does not work.
> > Other keys that don't start with a digit are successfully retrieved
> > from the map.
>
> I haven't tried it, but what you say about the Map is interesting and
> makes me guess that what I suggested above would fail. So the problem
> with retrieval likely stems from the fact that the key name is numeric.
> Have you tried an Ident object which takes a numeric parameter for the
> key name (e.g. int or Integer)?
Looking again at GetExcecutor, the argument would have to be instanceof
Object, so make that Integer.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]