Class PluginProtos.CodeGeneratorRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<PluginProtos.CodeGeneratorRequest,PluginProtos.CodeGeneratorRequest.Builder>
com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest
All Implemented Interfaces:
PluginProtos.CodeGeneratorRequestOrBuilder, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder
Enclosing class:
PluginProtos

public static final class PluginProtos.CodeGeneratorRequest extends com.google.protobuf.GeneratedMessageLite<PluginProtos.CodeGeneratorRequest,PluginProtos.CodeGeneratorRequest.Builder> implements PluginProtos.CodeGeneratorRequestOrBuilder
 An encoded CodeGeneratorRequest is written to the plugin's stdin.
 
Protobuf type google.protobuf.compiler.CodeGeneratorRequest
  • Field Details

    • FILE_TO_GENERATE_FIELD_NUMBER

      public static final int FILE_TO_GENERATE_FIELD_NUMBER
      See Also:
    • PARAMETER_FIELD_NUMBER

      public static final int PARAMETER_FIELD_NUMBER
      See Also:
    • PROTO_FILE_FIELD_NUMBER

      public static final int PROTO_FILE_FIELD_NUMBER
      See Also:
    • SOURCE_FILE_DESCRIPTORS_FIELD_NUMBER

      public static final int SOURCE_FILE_DESCRIPTORS_FIELD_NUMBER
      See Also:
    • COMPILER_VERSION_FIELD_NUMBER

      public static final int COMPILER_VERSION_FIELD_NUMBER
      See Also:
  • Method Details

    • getFileToGenerateList

      public List<String> 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 [json_name = "fileToGenerate"];
      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 [json_name = "fileToGenerate"];
      Specified by:
      getFileToGenerateCount in interface PluginProtos.CodeGeneratorRequestOrBuilder
      Returns:
      The count of fileToGenerate.
    • getFileToGenerate

      public 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 [json_name = "fileToGenerate"];
      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 com.google.protobuf.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 [json_name = "fileToGenerate"];
      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.
    • hasParameter

      public boolean hasParameter()
       The generator parameter passed on the command-line.
       
      optional string parameter = 2 [json_name = "parameter"];
      Specified by:
      hasParameter in interface PluginProtos.CodeGeneratorRequestOrBuilder
      Returns:
      Whether the parameter field is set.
    • getParameter

      public String getParameter()
       The generator parameter passed on the command-line.
       
      optional string parameter = 2 [json_name = "parameter"];
      Specified by:
      getParameter in interface PluginProtos.CodeGeneratorRequestOrBuilder
      Returns:
      The parameter.
    • getParameterBytes

      public com.google.protobuf.ByteString getParameterBytes()
       The generator parameter passed on the command-line.
       
      optional string parameter = 2 [json_name = "parameter"];
      Specified by:
      getParameterBytes in interface PluginProtos.CodeGeneratorRequestOrBuilder
      Returns:
      The bytes for parameter.
    • getProtoFileList

      public 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.
      
       Note: the files listed in files_to_generate will include runtime-retention
       options only, but all other files will include source-retention options.
       The source_file_descriptors field below is available in case you need
       source-retention options for files_to_generate.
      
       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 [json_name = "protoFile"];
      Specified by:
      getProtoFileList in interface PluginProtos.CodeGeneratorRequestOrBuilder
    • getProtoFileOrBuilderList

      public 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.
      
       Note: the files listed in files_to_generate will include runtime-retention
       options only, but all other files will include source-retention options.
       The source_file_descriptors field below is available in case you need
       source-retention options for files_to_generate.
      
       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 [json_name = "protoFile"];
    • 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.
      
       Note: the files listed in files_to_generate will include runtime-retention
       options only, but all other files will include source-retention options.
       The source_file_descriptors field below is available in case you need
       source-retention options for files_to_generate.
      
       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 [json_name = "protoFile"];
      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.
      
       Note: the files listed in files_to_generate will include runtime-retention
       options only, but all other files will include source-retention options.
       The source_file_descriptors field below is available in case you need
       source-retention options for files_to_generate.
      
       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 [json_name = "protoFile"];
      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.
      
       Note: the files listed in files_to_generate will include runtime-retention
       options only, but all other files will include source-retention options.
       The source_file_descriptors field below is available in case you need
       source-retention options for files_to_generate.
      
       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 [json_name = "protoFile"];
    • getSourceFileDescriptorsList

      public List<DescriptorProtos.FileDescriptorProto> getSourceFileDescriptorsList()
       File descriptors with all options, including source-retention options.
       These descriptors are only provided for the files listed in
       files_to_generate.
       
      repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17 [json_name = "sourceFileDescriptors"];
      Specified by:
      getSourceFileDescriptorsList in interface PluginProtos.CodeGeneratorRequestOrBuilder
    • getSourceFileDescriptorsOrBuilderList

      public List<? extends DescriptorProtos.FileDescriptorProtoOrBuilder> getSourceFileDescriptorsOrBuilderList()
       File descriptors with all options, including source-retention options.
       These descriptors are only provided for the files listed in
       files_to_generate.
       
      repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17 [json_name = "sourceFileDescriptors"];
    • getSourceFileDescriptorsCount

      public int getSourceFileDescriptorsCount()
       File descriptors with all options, including source-retention options.
       These descriptors are only provided for the files listed in
       files_to_generate.
       
      repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17 [json_name = "sourceFileDescriptors"];
      Specified by:
      getSourceFileDescriptorsCount in interface PluginProtos.CodeGeneratorRequestOrBuilder
    • getSourceFileDescriptors

      public DescriptorProtos.FileDescriptorProto getSourceFileDescriptors(int index)
       File descriptors with all options, including source-retention options.
       These descriptors are only provided for the files listed in
       files_to_generate.
       
      repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17 [json_name = "sourceFileDescriptors"];
      Specified by:
      getSourceFileDescriptors in interface PluginProtos.CodeGeneratorRequestOrBuilder
    • getSourceFileDescriptorsOrBuilder

      public DescriptorProtos.FileDescriptorProtoOrBuilder getSourceFileDescriptorsOrBuilder(int index)
       File descriptors with all options, including source-retention options.
       These descriptors are only provided for the files listed in
       files_to_generate.
       
      repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17 [json_name = "sourceFileDescriptors"];
    • hasCompilerVersion

      public boolean hasCompilerVersion()
       The version number of protocol compiler.
       
      optional .google.protobuf.compiler.Version compiler_version = 3 [json_name = "compilerVersion"];
      Specified by:
      hasCompilerVersion in interface PluginProtos.CodeGeneratorRequestOrBuilder
      Returns:
      Whether the compilerVersion field is set.
    • getCompilerVersion

      public PluginProtos.Version getCompilerVersion()
       The version number of protocol compiler.
       
      optional .google.protobuf.compiler.Version compiler_version = 3 [json_name = "compilerVersion"];
      Specified by:
      getCompilerVersion in interface PluginProtos.CodeGeneratorRequestOrBuilder
      Returns:
      The compilerVersion.
    • parseFrom

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

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

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

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

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

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

      public static PluginProtos.CodeGeneratorRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

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

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

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

      public static PluginProtos.CodeGeneratorRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static PluginProtos.CodeGeneratorRequest.Builder newBuilder()
    • newBuilder

    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<PluginProtos.CodeGeneratorRequest,PluginProtos.CodeGeneratorRequest.Builder>
    • getDefaultInstance

      public static PluginProtos.CodeGeneratorRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<PluginProtos.CodeGeneratorRequest> parser()