Diagnostic command fixes
Frederic Parain
frederic.parain at oracle.com
Tue Feb 14 10:27:33 PST 2012
On 14/02/2012 18:55, Karen Kinnear wrote:
> Thank you Nils :-)
>
> I had a question on the DCmdArgument<NanoTimeArgument> - I think I am
> not reading
> this correctly:
>
> Couple of questions please:
>
> I haven't seen the specification at this level of detail, but I thought
> that if
> you entered a digit value with no units that you got ns by default -
> i.e. we need to
> be able to parse units, but they are not required.
This is code matches the behavior of the JRockit parser, if the
specification has changed to consider digit value with no units as
ns, then we can remove this logic. Personally, I'd prefer this new
semantic.
> 2) What does this comment mean:
>
> // WARNING StringArrayArgument can only be used as an option, it cannot be
> // used as an argument with the DCmdParser
> ... DCmdArgument<StringArrayArgument*>
>
> -- what can't you do with it more specifically please? Do you mean you can't
> pass it as an argument to parse_value?
With the DCmdParser, "options" are defined with a "key=value" syntax and
can be specified in any order. "arguments" don't have key, just a value
and are identified by their position on the command line (options are
ignored when positions are computed). There's actually no way to specify
that an argument can be passed at multiple positions.
StringArrayArgument is an argument type defined to accept multiple
strings. As it is not possible to specify the multiple position for
an argument, StringArrayArgument can only used as an "option", each
string being preceded by the same key.
Fred
--
Frederic Parain - Oracle
Grenoble Engineering Center - France
Phone: +33 4 76 18 81 17
Email: Frederic.Parain at oracle.com
More information about the serviceability-dev
mailing list