On Sun, Sep 10, 2006 at 12:37:39AM -0700, Henri Yandell wrote:
> A third thought is that the CLI2 CommandLine API for the data itself
> rests on a getValue(Option);Object method, which implies some
> conversion is going on but I've not seen how yet by looking at the
> API.
This is done with an o.a.c.cli2.vlidation.Validator which is presented
with a List which it changes by replacing String objects with one of
their choice (FileValidator uses File objects for example).
> Configuration also does conversion of String to various objects.
> BeanUtils does that too, which gave rise to an overmodelled [convert]
> package that we've talked about restarting as something simpler.
The first step would be to split the Validation and Conversion and this
sounds like it is a problem which must have been encountered before.
There is the risk of making it even more verbose by having to specify
that you want the argument converted into a File and also that you want
to validate that the File exists. I'm sure we can work on a concise way
of doing this as it is a logical split and confusing as it stands.
Andrew Shirley
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|