Class Build.SourceFile.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Build.SourceFile.Builder>
com.google.devtools.build.lib.query2.proto.proto2api.Build.SourceFile.Builder
All Implemented Interfaces:
Build.SourceFileOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Build.SourceFile

public static final class Build.SourceFile.Builder extends com.google.protobuf.GeneratedMessage.Builder<Build.SourceFile.Builder> implements Build.SourceFileOrBuilder
 A file that is an input into the build system.
 Next-Id: 10
 
Protobuf type blaze_query.SourceFile
  • 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<Build.SourceFile.Builder>
    • clear

      public Build.SourceFile.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<Build.SourceFile.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<Build.SourceFile.Builder>
    • getDefaultInstanceForType

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

      public Build.SourceFile build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public Build.SourceFile.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<Build.SourceFile.Builder>
    • mergeFrom

      public Build.SourceFile.Builder mergeFrom(Build.SourceFile other)
    • isInitialized

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

      public Build.SourceFile.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<Build.SourceFile.Builder>
      Throws:
      IOException
    • hasName

      public boolean hasName()
       The name of the source file (a label).
       
      required string name = 1;
      Specified by:
      hasName in interface Build.SourceFileOrBuilder
      Returns:
      Whether the name field is set.
    • getName

      public String getName()
       The name of the source file (a label).
       
      required string name = 1;
      Specified by:
      getName in interface Build.SourceFileOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the source file (a label).
       
      required string name = 1;
      Specified by:
      getNameBytes in interface Build.SourceFileOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Build.SourceFile.Builder setName(String value)
       The name of the source file (a label).
       
      required string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Build.SourceFile.Builder clearName()
       The name of the source file (a label).
       
      required string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Build.SourceFile.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the source file (a label).
       
      required string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasLocation

      public boolean hasLocation()
       The location of the source file.  This is a path with a line number and a
       column number not a label in the build system.
       
      optional string location = 2;
      Specified by:
      hasLocation in interface Build.SourceFileOrBuilder
      Returns:
      Whether the location field is set.
    • getLocation

      public String getLocation()
       The location of the source file.  This is a path with a line number and a
       column number not a label in the build system.
       
      optional string location = 2;
      Specified by:
      getLocation in interface Build.SourceFileOrBuilder
      Returns:
      The location.
    • getLocationBytes

      public com.google.protobuf.ByteString getLocationBytes()
       The location of the source file.  This is a path with a line number and a
       column number not a label in the build system.
       
      optional string location = 2;
      Specified by:
      getLocationBytes in interface Build.SourceFileOrBuilder
      Returns:
      The bytes for location.
    • setLocation

      public Build.SourceFile.Builder setLocation(String value)
       The location of the source file.  This is a path with a line number and a
       column number not a label in the build system.
       
      optional string location = 2;
      Parameters:
      value - The location to set.
      Returns:
      This builder for chaining.
    • clearLocation

      public Build.SourceFile.Builder clearLocation()
       The location of the source file.  This is a path with a line number and a
       column number not a label in the build system.
       
      optional string location = 2;
      Returns:
      This builder for chaining.
    • setLocationBytes

      public Build.SourceFile.Builder setLocationBytes(com.google.protobuf.ByteString value)
       The location of the source file.  This is a path with a line number and a
       column number not a label in the build system.
       
      optional string location = 2;
      Parameters:
      value - The bytes for location to set.
      Returns:
      This builder for chaining.
    • getSubincludeList

      public com.google.protobuf.ProtocolStringList getSubincludeList()
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Specified by:
      getSubincludeList in interface Build.SourceFileOrBuilder
      Returns:
      A list containing the subinclude.
    • getSubincludeCount

      public int getSubincludeCount()
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Specified by:
      getSubincludeCount in interface Build.SourceFileOrBuilder
      Returns:
      The count of subinclude.
    • getSubinclude

      public String getSubinclude(int index)
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Specified by:
      getSubinclude in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The subinclude at the given index.
    • getSubincludeBytes

      public com.google.protobuf.ByteString getSubincludeBytes(int index)
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Specified by:
      getSubincludeBytes in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the subinclude at the given index.
    • setSubinclude

      public Build.SourceFile.Builder setSubinclude(int index, String value)
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Parameters:
      index - The index to set the value at.
      value - The subinclude to set.
      Returns:
      This builder for chaining.
    • addSubinclude

      public Build.SourceFile.Builder addSubinclude(String value)
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Parameters:
      value - The subinclude to add.
      Returns:
      This builder for chaining.
    • addAllSubinclude

      public Build.SourceFile.Builder addAllSubinclude(Iterable<String> values)
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Parameters:
      values - The subinclude to add.
      Returns:
      This builder for chaining.
    • clearSubinclude

      public Build.SourceFile.Builder clearSubinclude()
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Returns:
      This builder for chaining.
    • addSubincludeBytes

      public Build.SourceFile.Builder addSubincludeBytes(com.google.protobuf.ByteString value)
       Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
       file. This is present only when the SourceFile represents a BUILD file that
       loaded .bzl files.
       TODO(bazel-team): Rename this field.
       
      repeated string subinclude = 3;
      Parameters:
      value - The bytes of the subinclude to add.
      Returns:
      This builder for chaining.
    • getPackageGroupList

      public com.google.protobuf.ProtocolStringList getPackageGroupList()
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Specified by:
      getPackageGroupList in interface Build.SourceFileOrBuilder
      Returns:
      A list containing the packageGroup.
    • getPackageGroupCount

      public int getPackageGroupCount()
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Specified by:
      getPackageGroupCount in interface Build.SourceFileOrBuilder
      Returns:
      The count of packageGroup.
    • getPackageGroup

      public String getPackageGroup(int index)
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Specified by:
      getPackageGroup in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The packageGroup at the given index.
    • getPackageGroupBytes

      public com.google.protobuf.ByteString getPackageGroupBytes(int index)
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Specified by:
      getPackageGroupBytes in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the packageGroup at the given index.
    • setPackageGroup

      public Build.SourceFile.Builder setPackageGroup(int index, String value)
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Parameters:
      index - The index to set the value at.
      value - The packageGroup to set.
      Returns:
      This builder for chaining.
    • addPackageGroup

      public Build.SourceFile.Builder addPackageGroup(String value)
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Parameters:
      value - The packageGroup to add.
      Returns:
      This builder for chaining.
    • addAllPackageGroup

      public Build.SourceFile.Builder addAllPackageGroup(Iterable<String> values)
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Parameters:
      values - The packageGroup to add.
      Returns:
      This builder for chaining.
    • clearPackageGroup

      public Build.SourceFile.Builder clearPackageGroup()
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Returns:
      This builder for chaining.
    • addPackageGroupBytes

      public Build.SourceFile.Builder addPackageGroupBytes(com.google.protobuf.ByteString value)
       Labels of package groups that are mentioned in the visibility declaration
       for this source file.
       
      repeated string package_group = 4;
      Parameters:
      value - The bytes of the packageGroup to add.
      Returns:
      This builder for chaining.
    • getVisibilityLabelList

      public com.google.protobuf.ProtocolStringList getVisibilityLabelList()
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Specified by:
      getVisibilityLabelList in interface Build.SourceFileOrBuilder
      Returns:
      A list containing the visibilityLabel.
    • getVisibilityLabelCount

      public int getVisibilityLabelCount()
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Specified by:
      getVisibilityLabelCount in interface Build.SourceFileOrBuilder
      Returns:
      The count of visibilityLabel.
    • getVisibilityLabel

      public String getVisibilityLabel(int index)
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Specified by:
      getVisibilityLabel in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The visibilityLabel at the given index.
    • getVisibilityLabelBytes

      public com.google.protobuf.ByteString getVisibilityLabelBytes(int index)
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Specified by:
      getVisibilityLabelBytes in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the visibilityLabel at the given index.
    • setVisibilityLabel

      public Build.SourceFile.Builder setVisibilityLabel(int index, String value)
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Parameters:
      index - The index to set the value at.
      value - The visibilityLabel to set.
      Returns:
      This builder for chaining.
    • addVisibilityLabel

      public Build.SourceFile.Builder addVisibilityLabel(String value)
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Parameters:
      value - The visibilityLabel to add.
      Returns:
      This builder for chaining.
    • addAllVisibilityLabel

      public Build.SourceFile.Builder addAllVisibilityLabel(Iterable<String> values)
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Parameters:
      values - The visibilityLabel to add.
      Returns:
      This builder for chaining.
    • clearVisibilityLabel

      public Build.SourceFile.Builder clearVisibilityLabel()
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Returns:
      This builder for chaining.
    • addVisibilityLabelBytes

      public Build.SourceFile.Builder addVisibilityLabelBytes(com.google.protobuf.ByteString value)
       Labels mentioned in the visibility declaration (including :__pkg__ and
       //visibility: ones)
       
      repeated string visibility_label = 5;
      Parameters:
      value - The bytes of the visibilityLabel to add.
      Returns:
      This builder for chaining.
    • getFeatureList

      public com.google.protobuf.ProtocolStringList getFeatureList()
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Specified by:
      getFeatureList in interface Build.SourceFileOrBuilder
      Returns:
      A list containing the feature.
    • getFeatureCount

      public int getFeatureCount()
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Specified by:
      getFeatureCount in interface Build.SourceFileOrBuilder
      Returns:
      The count of feature.
    • getFeature

      public String getFeature(int index)
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Specified by:
      getFeature in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The feature at the given index.
    • getFeatureBytes

      public com.google.protobuf.ByteString getFeatureBytes(int index)
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Specified by:
      getFeatureBytes in interface Build.SourceFileOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the feature at the given index.
    • setFeature

      public Build.SourceFile.Builder setFeature(int index, String value)
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Parameters:
      index - The index to set the value at.
      value - The feature to set.
      Returns:
      This builder for chaining.
    • addFeature

      public Build.SourceFile.Builder addFeature(String value)
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Parameters:
      value - The feature to add.
      Returns:
      This builder for chaining.
    • addAllFeature

      public Build.SourceFile.Builder addAllFeature(Iterable<String> values)
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Parameters:
      values - The feature to add.
      Returns:
      This builder for chaining.
    • clearFeature

      public Build.SourceFile.Builder clearFeature()
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Returns:
      This builder for chaining.
    • addFeatureBytes

      public Build.SourceFile.Builder addFeatureBytes(com.google.protobuf.ByteString value)
       The package-level features enabled for this package. Only present if the
       SourceFile represents a BUILD file.
       
      repeated string feature = 6;
      Parameters:
      value - The bytes of the feature to add.
      Returns:
      This builder for chaining.
    • hasLicense

      public boolean hasLicense()
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
      Specified by:
      hasLicense in interface Build.SourceFileOrBuilder
      Returns:
      Whether the license field is set.
    • getLicense

      public Build.License getLicense()
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
      Specified by:
      getLicense in interface Build.SourceFileOrBuilder
      Returns:
      The license.
    • setLicense

      public Build.SourceFile.Builder setLicense(Build.License value)
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
    • setLicense

      public Build.SourceFile.Builder setLicense(Build.License.Builder builderForValue)
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
    • mergeLicense

      public Build.SourceFile.Builder mergeLicense(Build.License value)
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
    • clearLicense

      public Build.SourceFile.Builder clearLicense()
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
    • getLicenseBuilder

      public Build.License.Builder getLicenseBuilder()
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
    • getLicenseOrBuilder

      public Build.LicenseOrBuilder getLicenseOrBuilder()
       License attribute for the file.
       
      optional .blaze_query.License license = 8;
      Specified by:
      getLicenseOrBuilder in interface Build.SourceFileOrBuilder
    • hasPackageContainsErrors

      public boolean hasPackageContainsErrors()
       True if the package contains an error. Only present if the SourceFile
       represents a BUILD file.
       
      optional bool package_contains_errors = 9;
      Specified by:
      hasPackageContainsErrors in interface Build.SourceFileOrBuilder
      Returns:
      Whether the packageContainsErrors field is set.
    • getPackageContainsErrors

      public boolean getPackageContainsErrors()
       True if the package contains an error. Only present if the SourceFile
       represents a BUILD file.
       
      optional bool package_contains_errors = 9;
      Specified by:
      getPackageContainsErrors in interface Build.SourceFileOrBuilder
      Returns:
      The packageContainsErrors.
    • setPackageContainsErrors

      public Build.SourceFile.Builder setPackageContainsErrors(boolean value)
       True if the package contains an error. Only present if the SourceFile
       represents a BUILD file.
       
      optional bool package_contains_errors = 9;
      Parameters:
      value - The packageContainsErrors to set.
      Returns:
      This builder for chaining.
    • clearPackageContainsErrors

      public Build.SourceFile.Builder clearPackageContainsErrors()
       True if the package contains an error. Only present if the SourceFile
       represents a BUILD file.
       
      optional bool package_contains_errors = 9;
      Returns:
      This builder for chaining.