commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: [jci] configuration
Date Tue, 08 Aug 2006 00:11:24 GMT
On 8/7/06, Torsten Curdt <tcurdt@apache.org> wrote:
> I am currently trying to figure out the configuration part of jci
> ...and at the moment I am really torn apart which way to go.
>
> Usually I am one of those that likes static typing ...which is what
> the plexus compiler API (and the javac implementation of jci) uses.
> Having a configuration class with setters like
>
>   settings.setVerbose(boolean)
>
> ...but looking at the native eclipse compiler implementation (which is
> just using a map)
>
>   settings.put(settings.OPTION, settings.OPTION_VALUE)
>
<snip/>

Its a very eclipsy thing to do, OSGi bundles and services pass
java.util.Dictionary instances around (that API has been around for a
while) for the very reasons you state below. "Standard" property keys
are defined by the framework (all keys are Strings).


> I am really tempted to go that way. The interface would be so much
> easier and way more extensible. The compilers could pick the options
> they need and warn about options they don't understand.
>
> As very often the configuration does not come from a statically typed
> resource anyway (like a xml or properties file) the static API might
> not even that convenient at all.
>
> Opinions?
>
<snap/>

Not a bad idea, just needs lot of Javadocs.

-Rahul


> cheers
> --
> Torsten
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message