aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/common/options/OptionsParser.java
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-09-14 15:56:43 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-09-14 18:48:16 +0200
commit5fe8e6629e09ce44c6835d1b8f3a36bc3d69f131 (patch)
treedaf3564fe43f6585d3287b6c2f559f2beb7d478b /src/main/java/com/google/devtools/common/options/OptionsParser.java
parent28d3d2a96e95b2e26e6f864a52177864b0fa8e01 (diff)
Consolidate the "unparsed" option value tracking.
In preparation for linking the parsed and unparsed values of options, consolidate and standardize our representation of the flag values as we received them (what is meant by "unparsed" values in this case). This was being done separately in ParseOptionResult, which, with extra context added, is being folded into UnparsedOptionValueDescription. We now track how an option was provided and where it came from for all option parsing. RELNOTES: None. PiperOrigin-RevId: 168682082
Diffstat (limited to 'src/main/java/com/google/devtools/common/options/OptionsParser.java')
-rw-r--r--src/main/java/com/google/devtools/common/options/OptionsParser.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/common/options/OptionsParser.java b/src/main/java/com/google/devtools/common/options/OptionsParser.java
index 1d41e3dfbf..68a9f02100 100644
--- a/src/main/java/com/google/devtools/common/options/OptionsParser.java
+++ b/src/main/java/com/google/devtools/common/options/OptionsParser.java
@@ -405,20 +405,22 @@ public class OptionsParser implements OptionsProvider {
* @return The {@link OptionDescription} for the option, or null if there is no option by the
* given name.
*/
- OptionDescription getOptionDescription(String name) throws OptionsParsingException {
- return impl.getOptionDescription(name);
+ OptionDescription getOptionDescription(String name, OptionPriority priority, String source)
+ throws OptionsParsingException {
+ return impl.getOptionDescription(name, priority, source);
}
/**
* Returns a description of the options values that get expanded from this option with the given
* value.
*
- * @return The {@link com.google.devtools.common.options.OptionValueDescriptionlueDescription>}
- * for the option, or null if there is no option by the given name.
+ * @return The {@link com.google.devtools.common.options.OptionValueDescription>} for the option,
+ * or null if there is no option by the given name.
*/
ImmutableList<OptionValueDescription> getExpansionOptionValueDescriptions(
- OptionDefinition option, @Nullable String optionValue) throws OptionsParsingException {
- return impl.getExpansionOptionValueDescriptions(option, optionValue);
+ OptionDefinition option, @Nullable String optionValue, OptionPriority priority, String source)
+ throws OptionsParsingException {
+ return impl.getExpansionOptionValueDescriptions(option, optionValue, priority, source);
}
/**