Instead of requiring a static fromString method for converting
parameters i would suggest the introduction of an extra extension
point: the StringConverter provider.
A StringConverter could do the conversion from(/to) a String to(/form)
a parameter type. It could be annotated with @Provider and be
registered like other providers.
Some advantages over a static fromString/valueOf method:
- StringConverters can be used if the parameter type cannot be changed:
-- types from third party libraries
-- if code is not available
-- if classes are final
- sometimes static methods are not recommended, for example because
they cannot be stubbed, or even not permitted because of code style
- enum names can be restricted by code style (e.g. all uppercase),
where an API might required lowercase "constants"