summaryrefslogtreecommitdiff
path: root/java/com/google/devtools/common/options/Option.java
diff options
context:
space:
mode:
authorLuis Fernando Pino Duque <lpino@google.com>2016-04-20 09:26:20 +0000
committerColin Cross <ccross@android.com>2017-02-16 22:33:09 -0800
commit66c16197f2db59ec8b9ba3d9998a3368ad08d0ec (patch)
tree7a06bf0975c37ff002d3cae9eb2deb60af6ca051 /java/com/google/devtools/common/options/Option.java
parentf65ab7f7fc25df4aed16f682ac9bfded86b3d6a8 (diff)
downloaddesugar-66c16197f2db59ec8b9ba3d9998a3368ad08d0ec.tar.gz
Delete the defaultMultipleValue field from options and refactor the logic for retrieving
the default values of options. The field defaultMultipleValue was introduced in commit 51a491b89a9cd5f15c9a093a5693bc37e696e6e1 to allow defining a default value for options that set allowMultiple. However due to the limitations of the optionsParser end up being not useful since we cannot guarantee that an option that allows multiple has a converter that returns a list of values. Thus this CL deletes code that may confuse even more and clarifies the mechanism that the options currently use to obtain their default values. -- MOS_MIGRATED_REVID=120317261 GitOrigin-RevId: 31162bcf061cd58a5db628f51f3da5d7d43b7829 Change-Id: I31bd9714bb3950017453e24cc0ba37e5d7af94d1
Diffstat (limited to 'java/com/google/devtools/common/options/Option.java')
-rw-r--r--java/com/google/devtools/common/options/Option.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/java/com/google/devtools/common/options/Option.java b/java/com/google/devtools/common/options/Option.java
index 5cd6b73..784ba64 100644
--- a/java/com/google/devtools/common/options/Option.java
+++ b/java/com/google/devtools/common/options/Option.java
@@ -63,18 +63,12 @@ public @interface Option {
* "null" is only applicable when computing the default value; if specified
* on the command-line, this string will have its usual literal meaning.
*
- * <p>The default value for flags that set allowMultiple to true should be set with
- * {@link #defaultMultipleValue()}
+ * <p>The default value for flags that set allowMultiple is always the empty
+ * list and its default value is ignored.
*/
String defaultValue();
/**
- * This method is an extension of {@link #defaultValue()} and it enables setting default values
- * for flags whose allowMultiple is true. In that case {@link #defaultValue()} is ignored.
- */
- String[] defaultMultipleValue() default {};
-
- /**
* A string describing the category of options that this belongs to. {@link
* OptionsParser#describeOptions} prints options of the same category grouped
* together.