admin@glassfish.java.net

hidden command options

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Thu, 26 Aug 2010 23:49:00 -0700

Just like we have hidden commands (name starts with "_"),
Bhakti has asked for hidden options to commands. It's easy
to change the code that generates the usage message to ignore
options that start with "_".

Harder would be to add @Param(hidden=true).

Does anyone object to doing the same for options as we do for commands?

So, if you wanted a hidden "force" option, you would declare it
@Param(name="_force") and specify it on the command line as "--_force".

Of course, we could use any other special character we want. I just
chose "_" for consistency with hiddden commands. We could, for instance,
use "-", giving us a CLI option of "---force", which looks a bit nicer
but may be too subtle and easily confused.

Comments?