You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Set {@code interactive=true} to make this option prompt the end user for a value (like a password).
3886
+
* Set {@code interactive=true} if this option will prompt the end user for a value (like a password).
3887
3887
* Only supported for single-value options and {@code char[]} arrays (no collections, maps or other array types).
3888
-
* When running on Java 6 or greater and {@link Option#echo() echo = false} (the default),
3889
-
* this will use the {@link Console#readPassword()} API to get a value without echoing input to the console,
3890
-
* otherwise it will simply read a value from {@code System.in}.
3888
+
* When running on Java 6 or greater and echo attribute is false, this will use the {@link Console#readPassword()} API to get a value without echoing input to the console.
3891
3889
* <p>
3892
-
* For passwords, best security practice is to use type {@code char[]} instead of {@code String}, and to to null out the array after use.
3890
+
* Best security practice is to use type {@code char[]} instead of {@code String}, and to to null out the array after use.
3893
3891
* </p><p>
3894
3892
* When defined with {@code arity = "0..1"}, the option can also take a value from the command line.
3895
3893
* (The user will still be prompted if no option parameter was specified on the command line.)
@@ -3900,20 +3898,20 @@ public enum ScopeType {
3900
3898
*/
3901
3899
boolean interactive() default false;
3902
3900
3903
-
/** Use this attribute to control whether user input for an interactive option is echoed to the console or not.
3904
-
* If {@code echo = true}, the user input is echoed to the console.
3905
-
* This attribute is ignored when {@code interactive = false} (the default).
3906
-
* @return whether the user input for an interactive option should be echoed to the console or not
3907
-
* @see OptionSpec#echo()
3908
-
* @since 4.6 */
3901
+
/**
3902
+
* Use this attribute to control a user input is echo-ed to the console or not. If {@code echo=true}, a input is echo-ed to the console.
3903
+
* This attribute is ignored when interactive attribute is false.
3904
+
* @return whether the user input is echo-ed to the console or not
3905
+
* @since 4.X
3906
+
*/
3909
3907
boolean echo() default false;
3910
3908
3911
-
/** Use this attribute to customize the text displayed to the end user for an interactive option when asking for user input.
3912
-
* When omitted, the displayed text is derived from the option name and the first description line.
3913
-
* This attribute is ignored when {@code interactive = false} (the default).
3914
-
* @return the text to display to the end user for an interactive option when asking for user input
3915
-
* @see OptionSpec#prompt()
3916
-
* @since 4.6 */
3909
+
/**
3910
+
* Use this attribute to customize the text displayed to the end user for an interactive option.
3911
+
* This attribute is ignored when interactive attribute is false.
3912
+
* @return text will be displayed to the end user
3913
+
* @since 4.X
3914
+
*/
3917
3915
String prompt() default "";
3918
3916
3919
3917
/** ResourceBundle key for this option. If not specified, (and a ResourceBundle {@linkplain Command#resourceBundle() exists for this command}) an attempt
@@ -4176,29 +4174,26 @@ public enum ScopeType {
4176
4174
/**
4177
4175
* Set {@code interactive=true} if this positional parameter will prompt the end user for a value (like a password).
4178
4176
* Only supported for single-value positional parameters (not arrays, collections or maps).
4179
-
* When running on Java 6 or greater and {@link Option#echo() echo = false} (the default),
4180
-
* this will use the {@link Console#readPassword()} API to get a value without echoing input to the console,
4181
-
* otherwise it will simply read a value from {@code System.in}.
4177
+
* When running on Java 6 or greater and echo attribute is false, this will use the {@link Console#readPassword()} API to get a value without echoing input to the console.
4182
4178
* @return whether this positional parameter prompts the end user for a value to be entered on the command line
4183
4179
* @since 3.5
4184
4180
*/
4185
4181
boolean interactive() default false;
4186
4182
4187
-
/** Use this attribute to control whether user input for an interactive positional parameter is echoed to the console or not.
4188
-
* If {@code echo = true}, the user input is echoed to the console.
4189
-
* This attribute is ignored when {@code interactive = false} (the default).
4190
-
* @return whether the user input for an interactive positional parameter should be echoed to the console or not
4191
-
* @see PositionalParamSpec#echo()
4192
-
* @since 4.6 */
4183
+
/**
4184
+
* Use this attribute to control a user input is echo-ed to the console or not. If {@code echo=true}, a input is echo-ed to the console.
4185
+
* This attribute is ignored when interactive attribute is false.
4186
+
* @return whether the user input is echo-ed to the console or not
4187
+
* @since 4.X
4188
+
*/
4193
4189
boolean echo() default false;
4194
4190
4195
-
/** Use this attribute to customize the text displayed to the end user for an interactive positional parameter when asking for user input.
4196
-
* When omitted, the displayed text is derived from the positional parameter's
4197
-
* position (index) and the first description line.
4198
-
* This attribute is ignored when {@code interactive = false} (the default).
4199
-
* @return the text to display to the end user for an interactive positional parameter when asking for user input
4200
-
* @see PositionalParamSpec#prompt()
4201
-
* @since 4.6 */
4191
+
/**
4192
+
* Use this attribute to customize the text displayed to the end user for an interactive option.
4193
+
* This attribute is ignored when interactive attribute is false.
4194
+
* @return text will be displayed to the end user
4195
+
* @since 4.X
4196
+
*/
4202
4197
String prompt() default "";
4203
4198
4204
4199
/** ResourceBundle key for this option. If not specified, (and a ResourceBundle {@linkplain Command#resourceBundle() exists for this command}) an attempt
@@ -8435,18 +8430,13 @@ public boolean required() {
0 commit comments