On 8/7/06, Torsten Curdt <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to