Am 07.08.2013, 09:18 Uhr, schrieb Xuelei Fan <xuelei....@oracle.com>:
I was considering to use enum as Sean suggested. Both String and integer is not accept to me because they are pretty easy to get used incorrectly.
Strings have the big advantage that you can put this advanced parameter into a config file and even use implementation specific values you/appvendor dont know at compile time.
For having the same flexibility with typed parameters a lot of infrastructure might be needed for discovery (I think no JDK component has that level for an interface).
Enums are speficically bad in allowing provider specific algorithms, Integers would only work with a registry. Strings are self describing enough to go without a registry (if you want to be safe you could use URIs like XML Parser params/features).
Gruss Bernd -- http://bernd.eckenfels.net