On Wed, 2003-03-05 at 22:12, Michael Lanzetta wrote:
> On an unrelated note (but as long as you're looking at a future API), I 
> have a program that needs to do some post-processing on the argument 
> values for certain options.  This is impossible in your current (v1.0) 
> implementation (nor in v2.0a).  In my current application, I've updated 
> Option and CommandLine to have a setValues() method, and that fixes my 
> immediate problem, but ideally it would be nice to allow for the execution 
> of a functor on the sighting of the option, and on each argument. 
> Something like:
> 
> OptionBuilder.onOption(OptionFunctor) 
> ArgumentBuilder.onValue(ArgumentFunctor)
> 
> Where the functors are interfaces implementing the following:
> void OptionFunctor.execute(Option option) // Option is passed in so the 
> same functor can be used for multiple options
> String ArgumentFunctor.execute(String argument) // the argument is passed 
> in, and the final argument that is stored as a value is returned
> 
> I'm still working out with my company as to
> A) whether I'm allowed to use jakarta software, and
> B) whether I'm allowed to contribute
> 
> But if both turn out true, and there's support for this idea, I'd be 
> willing to take a pass at the implementation.
Can you give an example where you would need to use it?  It sounds
like a good idea but I can't think of an obvious use.

-John K



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to