Oracle, and perhaps Java source licensees, would like to add validation control to the setting of command line switches in Hotspot that are vendor-specific. To this end, a framework for doing so is needed.
The framework should be able to validate any change to the value or origin for any command-line flag, and abort the setting if the validation fails. For example, a flag may be of integer type but only allow a certain value range [a,b], or may only be set from a certain origin such as the command line.
When parsing the command line options, a failed validation will typically result in an error message and exit with "Unrecognized VM option '<flag-name>'". When used dynamically using the attach API or management API the resulting operation will fail with an appropriate message.