Class CommandLineOuterClass.Option.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CommandLineOuterClass.Option.Builder>
com.google.devtools.build.lib.runtime.proto.CommandLineOuterClass.Option.Builder
All Implemented Interfaces:
CommandLineOuterClass.OptionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CommandLineOuterClass.Option

public static final class CommandLineOuterClass.Option.Builder extends com.google.protobuf.GeneratedMessage.Builder<CommandLineOuterClass.Option.Builder> implements CommandLineOuterClass.OptionOrBuilder
 A single command line option.

 This represents the option itself, but does not take into account the type of
 option or how the parser interpreted it. If this option is part of a command
 line that represents the actual input that Bazel received, it would, for
 example, include expansion flags as they are. However, if this option
 represents the canonical form of the command line, with the values as Bazel
 understands them, then the expansion flag, which has no value, would not
 appear, and the flags it expands to would.
 
Protobuf type command_line.Option
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CommandLineOuterClass.Option.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CommandLineOuterClass.Option.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CommandLineOuterClass.Option.Builder>
    • getDefaultInstanceForType

      public CommandLineOuterClass.Option getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CommandLineOuterClass.Option buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CommandLineOuterClass.Option.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CommandLineOuterClass.Option.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<CommandLineOuterClass.Option.Builder>
    • mergeFrom

      public CommandLineOuterClass.Option.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CommandLineOuterClass.Option.Builder>
      Throws:
      IOException
    • getCombinedForm

      public String getCombinedForm()
       How the option looks with the option and its value combined. Depending on
       the purpose of this command line report, this could be the canonical
       form, or the way that the flag was set.
      
       Some examples: this might be `--foo=bar` form, or `--foo bar` with a space;
       for boolean flags, `--nobaz` is accepted on top of `--baz=false` and other
       negating values, or for a positive value, the unqualified `--baz` form
       is also accepted. This could also be a short `-b`, if the flag has an
       abbreviated form.
       
      string combined_form = 1;
      Specified by:
      getCombinedForm in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The combinedForm.
    • getCombinedFormBytes

      public com.google.protobuf.ByteString getCombinedFormBytes()
       How the option looks with the option and its value combined. Depending on
       the purpose of this command line report, this could be the canonical
       form, or the way that the flag was set.
      
       Some examples: this might be `--foo=bar` form, or `--foo bar` with a space;
       for boolean flags, `--nobaz` is accepted on top of `--baz=false` and other
       negating values, or for a positive value, the unqualified `--baz` form
       is also accepted. This could also be a short `-b`, if the flag has an
       abbreviated form.
       
      string combined_form = 1;
      Specified by:
      getCombinedFormBytes in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The bytes for combinedForm.
    • setCombinedForm

      public CommandLineOuterClass.Option.Builder setCombinedForm(String value)
       How the option looks with the option and its value combined. Depending on
       the purpose of this command line report, this could be the canonical
       form, or the way that the flag was set.
      
       Some examples: this might be `--foo=bar` form, or `--foo bar` with a space;
       for boolean flags, `--nobaz` is accepted on top of `--baz=false` and other
       negating values, or for a positive value, the unqualified `--baz` form
       is also accepted. This could also be a short `-b`, if the flag has an
       abbreviated form.
       
      string combined_form = 1;
      Parameters:
      value - The combinedForm to set.
      Returns:
      This builder for chaining.
    • clearCombinedForm

      public CommandLineOuterClass.Option.Builder clearCombinedForm()
       How the option looks with the option and its value combined. Depending on
       the purpose of this command line report, this could be the canonical
       form, or the way that the flag was set.
      
       Some examples: this might be `--foo=bar` form, or `--foo bar` with a space;
       for boolean flags, `--nobaz` is accepted on top of `--baz=false` and other
       negating values, or for a positive value, the unqualified `--baz` form
       is also accepted. This could also be a short `-b`, if the flag has an
       abbreviated form.
       
      string combined_form = 1;
      Returns:
      This builder for chaining.
    • setCombinedFormBytes

      public CommandLineOuterClass.Option.Builder setCombinedFormBytes(com.google.protobuf.ByteString value)
       How the option looks with the option and its value combined. Depending on
       the purpose of this command line report, this could be the canonical
       form, or the way that the flag was set.
      
       Some examples: this might be `--foo=bar` form, or `--foo bar` with a space;
       for boolean flags, `--nobaz` is accepted on top of `--baz=false` and other
       negating values, or for a positive value, the unqualified `--baz` form
       is also accepted. This could also be a short `-b`, if the flag has an
       abbreviated form.
       
      string combined_form = 1;
      Parameters:
      value - The bytes for combinedForm to set.
      Returns:
      This builder for chaining.
    • getOptionName

      public String getOptionName()
       The canonical name of the option, without the preceding dashes.
       
      string option_name = 2;
      Specified by:
      getOptionName in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The optionName.
    • getOptionNameBytes

      public com.google.protobuf.ByteString getOptionNameBytes()
       The canonical name of the option, without the preceding dashes.
       
      string option_name = 2;
      Specified by:
      getOptionNameBytes in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The bytes for optionName.
    • setOptionName

      public CommandLineOuterClass.Option.Builder setOptionName(String value)
       The canonical name of the option, without the preceding dashes.
       
      string option_name = 2;
      Parameters:
      value - The optionName to set.
      Returns:
      This builder for chaining.
    • clearOptionName

      public CommandLineOuterClass.Option.Builder clearOptionName()
       The canonical name of the option, without the preceding dashes.
       
      string option_name = 2;
      Returns:
      This builder for chaining.
    • setOptionNameBytes

      public CommandLineOuterClass.Option.Builder setOptionNameBytes(com.google.protobuf.ByteString value)
       The canonical name of the option, without the preceding dashes.
       
      string option_name = 2;
      Parameters:
      value - The bytes for optionName to set.
      Returns:
      This builder for chaining.
    • getOptionValue

      public String getOptionValue()
       The value of the flag, or unset for flags that do not take values.
       Especially for boolean flags, this should be in canonical form, the
       combined_form field above gives room for showing the flag as it was set
       if that is preferred.
       
      string option_value = 3;
      Specified by:
      getOptionValue in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The optionValue.
    • getOptionValueBytes

      public com.google.protobuf.ByteString getOptionValueBytes()
       The value of the flag, or unset for flags that do not take values.
       Especially for boolean flags, this should be in canonical form, the
       combined_form field above gives room for showing the flag as it was set
       if that is preferred.
       
      string option_value = 3;
      Specified by:
      getOptionValueBytes in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The bytes for optionValue.
    • setOptionValue

      public CommandLineOuterClass.Option.Builder setOptionValue(String value)
       The value of the flag, or unset for flags that do not take values.
       Especially for boolean flags, this should be in canonical form, the
       combined_form field above gives room for showing the flag as it was set
       if that is preferred.
       
      string option_value = 3;
      Parameters:
      value - The optionValue to set.
      Returns:
      This builder for chaining.
    • clearOptionValue

      public CommandLineOuterClass.Option.Builder clearOptionValue()
       The value of the flag, or unset for flags that do not take values.
       Especially for boolean flags, this should be in canonical form, the
       combined_form field above gives room for showing the flag as it was set
       if that is preferred.
       
      string option_value = 3;
      Returns:
      This builder for chaining.
    • setOptionValueBytes

      public CommandLineOuterClass.Option.Builder setOptionValueBytes(com.google.protobuf.ByteString value)
       The value of the flag, or unset for flags that do not take values.
       Especially for boolean flags, this should be in canonical form, the
       combined_form field above gives room for showing the flag as it was set
       if that is preferred.
       
      string option_value = 3;
      Parameters:
      value - The bytes for optionValue to set.
      Returns:
      This builder for chaining.
    • getEffectTagsList

      public List<OptionFilters.OptionEffectTag> getEffectTagsList()
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Specified by:
      getEffectTagsList in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      A list containing the effectTags.
    • getEffectTagsCount

      public int getEffectTagsCount()
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Specified by:
      getEffectTagsCount in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The count of effectTags.
    • getEffectTags

      public OptionFilters.OptionEffectTag getEffectTags(int index)
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Specified by:
      getEffectTags in interface CommandLineOuterClass.OptionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The effectTags at the given index.
    • setEffectTags

      public CommandLineOuterClass.Option.Builder setEffectTags(int index, OptionFilters.OptionEffectTag value)
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Parameters:
      index - The index to set the value at.
      value - The effectTags to set.
      Returns:
      This builder for chaining.
    • addEffectTags

       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Parameters:
      value - The effectTags to add.
      Returns:
      This builder for chaining.
    • addAllEffectTags

       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Parameters:
      values - The effectTags to add.
      Returns:
      This builder for chaining.
    • clearEffectTags

      public CommandLineOuterClass.Option.Builder clearEffectTags()
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Returns:
      This builder for chaining.
    • getEffectTagsValueList

      public List<Integer> getEffectTagsValueList()
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Specified by:
      getEffectTagsValueList in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for effectTags.
    • getEffectTagsValue

      public int getEffectTagsValue(int index)
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Specified by:
      getEffectTagsValue in interface CommandLineOuterClass.OptionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of effectTags at the given index.
    • setEffectTagsValue

      public CommandLineOuterClass.Option.Builder setEffectTagsValue(int index, int value)
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for effectTags to set.
      Returns:
      This builder for chaining.
    • addEffectTagsValue

      public CommandLineOuterClass.Option.Builder addEffectTagsValue(int value)
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Parameters:
      value - The enum numeric value on the wire for effectTags to add.
      Returns:
      This builder for chaining.
    • addAllEffectTagsValue

      public CommandLineOuterClass.Option.Builder addAllEffectTagsValue(Iterable<Integer> values)
       This flag's tagged effects. See OptionEffectTag's java documentation for
       details.
       
      repeated .options.OptionEffectTag effect_tags = 4;
      Parameters:
      values - The enum numeric values on the wire for effectTags to add.
      Returns:
      This builder for chaining.
    • getMetadataTagsList

      public List<OptionFilters.OptionMetadataTag> getMetadataTagsList()
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Specified by:
      getMetadataTagsList in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      A list containing the metadataTags.
    • getMetadataTagsCount

      public int getMetadataTagsCount()
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Specified by:
      getMetadataTagsCount in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      The count of metadataTags.
    • getMetadataTags

      public OptionFilters.OptionMetadataTag getMetadataTags(int index)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Specified by:
      getMetadataTags in interface CommandLineOuterClass.OptionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The metadataTags at the given index.
    • setMetadataTags

      public CommandLineOuterClass.Option.Builder setMetadataTags(int index, OptionFilters.OptionMetadataTag value)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Parameters:
      index - The index to set the value at.
      value - The metadataTags to set.
      Returns:
      This builder for chaining.
    • addMetadataTags

       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Parameters:
      value - The metadataTags to add.
      Returns:
      This builder for chaining.
    • addAllMetadataTags

      public CommandLineOuterClass.Option.Builder addAllMetadataTags(Iterable<? extends OptionFilters.OptionMetadataTag> values)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Parameters:
      values - The metadataTags to add.
      Returns:
      This builder for chaining.
    • clearMetadataTags

      public CommandLineOuterClass.Option.Builder clearMetadataTags()
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Returns:
      This builder for chaining.
    • getMetadataTagsValueList

      public List<Integer> getMetadataTagsValueList()
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Specified by:
      getMetadataTagsValueList in interface CommandLineOuterClass.OptionOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for metadataTags.
    • getMetadataTagsValue

      public int getMetadataTagsValue(int index)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Specified by:
      getMetadataTagsValue in interface CommandLineOuterClass.OptionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of metadataTags at the given index.
    • setMetadataTagsValue

      public CommandLineOuterClass.Option.Builder setMetadataTagsValue(int index, int value)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for metadataTags to set.
      Returns:
      This builder for chaining.
    • addMetadataTagsValue

      public CommandLineOuterClass.Option.Builder addMetadataTagsValue(int value)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Parameters:
      value - The enum numeric value on the wire for metadataTags to add.
      Returns:
      This builder for chaining.
    • addAllMetadataTagsValue

      public CommandLineOuterClass.Option.Builder addAllMetadataTagsValue(Iterable<Integer> values)
       Metadata about the flag. See OptionMetadataTag's java documentation for
       details.
       
      repeated .options.OptionMetadataTag metadata_tags = 5;
      Parameters:
      values - The enum numeric values on the wire for metadataTags to add.
      Returns:
      This builder for chaining.