Class Build.SourceFile.Builder

    • Method Detail

      • getDefaultInstanceForType

        public Build.SourceFile getDefaultInstanceForType()
        Description copied from interface: MessageLiteOrBuilder
        Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.
        Specified by:
        getDefaultInstanceForType in interface MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface MessageOrBuilder
      • mergeFrom

        public Build.SourceFile.Builder mergeFrom​(Message other)
        Description copied from interface: Message.Builder
        Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

        Merging occurs as follows. For each field:
        * For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
        * For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
        * For repeated fields, the elements in other are concatenated with the elements in this message.
        * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

        This is equivalent to the Message::MergeFrom method in C++.

        Specified by:
        mergeFrom in interface Message.Builder
        Overrides:
        mergeFrom in class AbstractMessage.Builder<Build.SourceFile.Builder>
      • 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 java.lang.String getName()
         The name of the source file (a label).
         
        required string name = 1;
        Specified by:
        getName in interface Build.SourceFileOrBuilder
        Returns:
        The name.
      • setName

        public Build.SourceFile.Builder setName​(java.lang.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​(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 java.lang.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 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​(java.lang.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​(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 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 java.lang.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 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,
                                                      java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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​(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 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 java.lang.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 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,
                                                        java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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​(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 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 java.lang.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 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,
                                                           java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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​(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 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 java.lang.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 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,
                                                   java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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​(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.
      • 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;
      • 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.