PluginProtos.CodeGeneratorRequest
com.google.protobuf.compiler

Class PluginProtos.CodeGeneratorRequest

    • Method Detail

      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Description copied from interface: MessageOrBuilder
        Get the UnknownFieldSet for this message.
        Specified by:
        getUnknownFields in interface MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getFileToGenerateList

        public ProtocolStringList getFileToGenerateList()
         The .proto files that were explicitly listed on the command-line.  The
         code generator should generate code only for these files.  Each file's
         descriptor will be included in proto_file, below.
         
        repeated string file_to_generate = 1;
        Specified by:
        getFileToGenerateList in interface PluginProtos.CodeGeneratorRequestOrBuilder
        Returns:
        A list containing the fileToGenerate.
      • getFileToGenerateCount

        public int getFileToGenerateCount()
         The .proto files that were explicitly listed on the command-line.  The
         code generator should generate code only for these files.  Each file's
         descriptor will be included in proto_file, below.
         
        repeated string file_to_generate = 1;
        Specified by:
        getFileToGenerateCount in interface PluginProtos.CodeGeneratorRequestOrBuilder
        Returns:
        The count of fileToGenerate.
      • getFileToGenerate

        public java.lang.String getFileToGenerate(int index)
         The .proto files that were explicitly listed on the command-line.  The
         code generator should generate code only for these files.  Each file's
         descriptor will be included in proto_file, below.
         
        repeated string file_to_generate = 1;
        Specified by:
        getFileToGenerate in interface PluginProtos.CodeGeneratorRequestOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The fileToGenerate at the given index.
      • getFileToGenerateBytes

        public ByteString getFileToGenerateBytes(int index)
         The .proto files that were explicitly listed on the command-line.  The
         code generator should generate code only for these files.  Each file's
         descriptor will be included in proto_file, below.
         
        repeated string file_to_generate = 1;
        Specified by:
        getFileToGenerateBytes in interface PluginProtos.CodeGeneratorRequestOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the fileToGenerate at the given index.
      • getProtoFileList

        public java.util.List<DescriptorProtos.FileDescriptorProto> getProtoFileList()
         FileDescriptorProtos for all files in files_to_generate and everything
         they import.  The files will appear in topological order, so each file
         appears before any file that imports it.
         protoc guarantees that all proto_files will be written after
         the fields above, even though this is not technically guaranteed by the
         protobuf wire format.  This theoretically could allow a plugin to stream
         in the FileDescriptorProtos and handle them one by one rather than read
         the entire set into memory at once.  However, as of this writing, this
         is not similarly optimized on protoc's end -- it will store all fields in
         memory at once before sending them to the plugin.
         Type names of fields and extensions in the FileDescriptorProto are always
         fully qualified.
         
        repeated .google.protobuf.FileDescriptorProto proto_file = 15;
        Specified by:
        getProtoFileList in interface PluginProtos.CodeGeneratorRequestOrBuilder
      • getProtoFileOrBuilderList

        public java.util.List<? extends DescriptorProtos.FileDescriptorProtoOrBuilder> getProtoFileOrBuilderList()
         FileDescriptorProtos for all files in files_to_generate and everything
         they import.  The files will appear in topological order, so each file
         appears before any file that imports it.
         protoc guarantees that all proto_files will be written after
         the fields above, even though this is not technically guaranteed by the
         protobuf wire format.  This theoretically could allow a plugin to stream
         in the FileDescriptorProtos and handle them one by one rather than read
         the entire set into memory at once.  However, as of this writing, this
         is not similarly optimized on protoc's end -- it will store all fields in
         memory at once before sending them to the plugin.
         Type names of fields and extensions in the FileDescriptorProto are always
         fully qualified.
         
        repeated .google.protobuf.FileDescriptorProto proto_file = 15;
        Specified by:
        getProtoFileOrBuilderList in interface PluginProtos.CodeGeneratorRequestOrBuilder
      • getProtoFileCount

        public int getProtoFileCount()
         FileDescriptorProtos for all files in files_to_generate and everything
         they import.  The files will appear in topological order, so each file
         appears before any file that imports it.
         protoc guarantees that all proto_files will be written after
         the fields above, even though this is not technically guaranteed by the
         protobuf wire format.  This theoretically could allow a plugin to stream
         in the FileDescriptorProtos and handle them one by one rather than read
         the entire set into memory at once.  However, as of this writing, this
         is not similarly optimized on protoc's end -- it will store all fields in
         memory at once before sending them to the plugin.
         Type names of fields and extensions in the FileDescriptorProto are always
         fully qualified.
         
        repeated .google.protobuf.FileDescriptorProto proto_file = 15;
        Specified by:
        getProtoFileCount in interface PluginProtos.CodeGeneratorRequestOrBuilder
      • getProtoFile

        public DescriptorProtos.FileDescriptorProto getProtoFile(int index)
         FileDescriptorProtos for all files in files_to_generate and everything
         they import.  The files will appear in topological order, so each file
         appears before any file that imports it.
         protoc guarantees that all proto_files will be written after
         the fields above, even though this is not technically guaranteed by the
         protobuf wire format.  This theoretically could allow a plugin to stream
         in the FileDescriptorProtos and handle them one by one rather than read
         the entire set into memory at once.  However, as of this writing, this
         is not similarly optimized on protoc's end -- it will store all fields in
         memory at once before sending them to the plugin.
         Type names of fields and extensions in the FileDescriptorProto are always
         fully qualified.
         
        repeated .google.protobuf.FileDescriptorProto proto_file = 15;
        Specified by:
        getProtoFile in interface PluginProtos.CodeGeneratorRequestOrBuilder
      • getProtoFileOrBuilder

        public DescriptorProtos.FileDescriptorProtoOrBuilder getProtoFileOrBuilder(int index)
         FileDescriptorProtos for all files in files_to_generate and everything
         they import.  The files will appear in topological order, so each file
         appears before any file that imports it.
         protoc guarantees that all proto_files will be written after
         the fields above, even though this is not technically guaranteed by the
         protobuf wire format.  This theoretically could allow a plugin to stream
         in the FileDescriptorProtos and handle them one by one rather than read
         the entire set into memory at once.  However, as of this writing, this
         is not similarly optimized on protoc's end -- it will store all fields in
         memory at once before sending them to the plugin.
         Type names of fields and extensions in the FileDescriptorProto are always
         fully qualified.
         
        repeated .google.protobuf.FileDescriptorProto proto_file = 15;
        Specified by:
        getProtoFileOrBuilder in interface PluginProtos.CodeGeneratorRequestOrBuilder
      • writeTo

        public void writeTo(CodedOutputStream output)
                     throws java.io.IOException
        Description copied from interface: MessageLite
        Serializes the message and writes it to output. This does not flush or close the stream.
        Specified by:
        writeTo in interface MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Description copied from interface: MessageLite
        Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that.
        Specified by:
        getSerializedSize in interface MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals(java.lang.Object obj)
        Description copied from interface: Message
        Compares the specified object with this message for equality. Returns true if the given object is a message of the same type (as defined by getDescriptorForType()) and has identical values for all of its fields. Subclasses must implement this; inheriting Object.equals() is incorrect.
        Specified by:
        equals in interface Message
        Overrides:
        equals in class AbstractMessage
        Parameters:
        obj - object to be compared for equality with this message
        Returns:
        true if the specified object is equal to this message
      • hashCode

        public int hashCode()
        Description copied from interface: Message
        Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting Object.hashCode() is incorrect.
        Specified by:
        hashCode in interface Message
        Overrides:
        hashCode in class AbstractMessage
        Returns:
        the hash code value for this message
        See Also:
        Map.hashCode()
      • parseDelimitedFrom

        public static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(java.io.InputStream input)
                                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getDefaultInstanceForType

        public PluginProtos.CodeGeneratorRequest 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