diff options
Diffstat (limited to 'src/main/java/com/google/devtools/common/options/Option.java')
-rw-r--r-- | src/main/java/com/google/devtools/common/options/Option.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/common/options/Option.java b/src/main/java/com/google/devtools/common/options/Option.java index ca3add9bec..a62558c4e7 100644 --- a/src/main/java/com/google/devtools/common/options/Option.java +++ b/src/main/java/com/google/devtools/common/options/Option.java @@ -130,4 +130,23 @@ public @interface Option { * is used. */ String deprecationWarning() default ""; + + /** + * The old name for this option. If an option has a name "foo" and an old name "bar", + * --foo=baz and --bar=baz will be equivalent. If the old name is used, a warning will be printed + * indicating that the old name is deprecated and the new name should be used. + */ + String oldName() default ""; + + /** + * Indicates that this option is a wrapper for other options, and will be unwrapped + * when parsed. For example, if foo is a wrapper option, then "--foo=--bar=baz" + * will be parsed as the flag "--bar=baz" (rather than --foo taking the value + * "--bar=baz"). A wrapper option should have the type {@link Void} (if it is something other + * than Void, the parser will not assign a value to it). The + * {@link Option#implicitRequirements()}, {@link Option#expansion()}, {@link Option#converter()} + * attributes will not be processed. Wrapper options are implicitly repeatable (i.e., as though + * {@link Option#allowMultiple()} is true regardless of its value in the annotation). + */ + boolean wrapperOption() default false; } |