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

public static final class Build.SourceFile extends com.google.protobuf.GeneratedMessage implements Build.SourceFileOrBuilder
 A file that is an input into the build system.
 Next-Id: 10
 
Protobuf type blaze_query.SourceFile
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A file that is an input into the build system.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    getFeature(int index)
    The package-level features enabled for this package.
    com.google.protobuf.ByteString
    getFeatureBytes(int index)
    The package-level features enabled for this package.
    int
    The package-level features enabled for this package.
    com.google.protobuf.ProtocolStringList
    The package-level features enabled for this package.
    License attribute for the file.
    License attribute for the file.
    The location of the source file.
    com.google.protobuf.ByteString
    The location of the source file.
    The name of the source file (a label).
    com.google.protobuf.ByteString
    The name of the source file (a label).
    boolean
    True if the package contains an error.
    getPackageGroup(int index)
    Labels of package groups that are mentioned in the visibility declaration for this source file.
    com.google.protobuf.ByteString
    Labels of package groups that are mentioned in the visibility declaration for this source file.
    int
    Labels of package groups that are mentioned in the visibility declaration for this source file.
    com.google.protobuf.ProtocolStringList
    Labels of package groups that are mentioned in the visibility declaration for this source file.
    com.google.protobuf.Parser<Build.SourceFile>
     
    int
     
    getSubinclude(int index)
    Labels of .bzl (Starlark) files that are transitively loaded in this BUILD file.
    com.google.protobuf.ByteString
    getSubincludeBytes(int index)
    Labels of .bzl (Starlark) files that are transitively loaded in this BUILD file.
    int
    Labels of .bzl (Starlark) files that are transitively loaded in this BUILD file.
    com.google.protobuf.ProtocolStringList
    Labels of .bzl (Starlark) files that are transitively loaded in this BUILD file.
    getVisibilityLabel(int index)
    Labels mentioned in the visibility declaration (including :__pkg__ and //visibility: ones)
    com.google.protobuf.ByteString
    Labels mentioned in the visibility declaration (including :__pkg__ and //visibility: ones)
    int
    Labels mentioned in the visibility declaration (including :__pkg__ and //visibility: ones)
    com.google.protobuf.ProtocolStringList
    Labels mentioned in the visibility declaration (including :__pkg__ and //visibility: ones)
    int
     
    boolean
    License attribute for the file.
    boolean
    The location of the source file.
    boolean
    The name of the source file (a label).
    boolean
    True if the package contains an error.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Build.SourceFile>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • LOCATION_FIELD_NUMBER

      public static final int LOCATION_FIELD_NUMBER
      See Also:
    • SUBINCLUDE_FIELD_NUMBER

      public static final int SUBINCLUDE_FIELD_NUMBER
      See Also:
    • PACKAGE_GROUP_FIELD_NUMBER

      public static final int PACKAGE_GROUP_FIELD_NUMBER
      See Also:
    • VISIBILITY_LABEL_FIELD_NUMBER

      public static final int VISIBILITY_LABEL_FIELD_NUMBER
      See Also:
    • FEATURE_FIELD_NUMBER

      public static final int FEATURE_FIELD_NUMBER
      See Also:
    • LICENSE_FIELD_NUMBER

      public static final int LICENSE_FIELD_NUMBER
      See Also:
    • PACKAGE_CONTAINS_ERRORS_FIELD_NUMBER

      public static final int PACKAGE_CONTAINS_ERRORS_FIELD_NUMBER
      See Also:
  • 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
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Build.SourceFile parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Build.SourceFile parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Build.SourceFile parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Build.SourceFile parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Build.SourceFile parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Build.SourceFile parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Build.SourceFile parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Build.SourceFile parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Build.SourceFile parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Build.SourceFile parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Build.SourceFile parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Build.SourceFile parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static Build.SourceFile.Builder newBuilder()
    • newBuilder

      public static Build.SourceFile.Builder newBuilder(Build.SourceFile prototype)
    • toBuilder

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

      protected Build.SourceFile.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Build.SourceFile getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Build.SourceFile> parser()
    • getParserForType

      public com.google.protobuf.Parser<Build.SourceFile> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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