Class PluginProtos.CodeGeneratorRequest.Builder (3.19.4)

public static final class PluginProtos.CodeGeneratorRequest.Builder extends GeneratedMessageV3.Builder<PluginProtos.CodeGeneratorRequest.Builder> implements PluginProtos.CodeGeneratorRequestOrBuilder

An encoded CodeGeneratorRequest is written to the plugin's stdin.

Protobuf type google.protobuf.compiler.CodeGeneratorRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptors.Descriptor

Methods

addAllFileToGenerate(Iterable<String> values)

public PluginProtos.CodeGeneratorRequest.Builder addAllFileToGenerate(Iterable<String> values)

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;

Parameter
NameDescription
valuesIterable<String>

The fileToGenerate to add.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

addAllProtoFile(Iterable<? extends DescriptorProtos.FileDescriptorProto> values)

public PluginProtos.CodeGeneratorRequest.Builder addAllProtoFile(Iterable<? extends DescriptorProtos.FileDescriptorProto> values)

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;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.DescriptorProtos.FileDescriptorProto>
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

addFileToGenerate(String value)

public PluginProtos.CodeGeneratorRequest.Builder addFileToGenerate(String value)

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;

Parameter
NameDescription
valueString

The fileToGenerate to add.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

addFileToGenerateBytes(ByteString value)

public PluginProtos.CodeGeneratorRequest.Builder addFileToGenerateBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes of the fileToGenerate to add.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

addProtoFile(DescriptorProtos.FileDescriptorProto value)

public PluginProtos.CodeGeneratorRequest.Builder addProtoFile(DescriptorProtos.FileDescriptorProto value)

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;

Parameter
NameDescription
valueDescriptorProtos.FileDescriptorProto
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

addProtoFile(DescriptorProtos.FileDescriptorProto.Builder builderForValue)

public PluginProtos.CodeGeneratorRequest.Builder addProtoFile(DescriptorProtos.FileDescriptorProto.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueDescriptorProtos.FileDescriptorProto.Builder
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

addProtoFile(int index, DescriptorProtos.FileDescriptorProto value)

public PluginProtos.CodeGeneratorRequest.Builder addProtoFile(int index, DescriptorProtos.FileDescriptorProto value)

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;

Parameters
NameDescription
indexint
valueDescriptorProtos.FileDescriptorProto
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

addProtoFile(int index, DescriptorProtos.FileDescriptorProto.Builder builderForValue)

public PluginProtos.CodeGeneratorRequest.Builder addProtoFile(int index, DescriptorProtos.FileDescriptorProto.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.FileDescriptorProto.Builder
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

addProtoFileBuilder()

public DescriptorProtos.FileDescriptorProto.Builder addProtoFileBuilder()

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;

Returns
TypeDescription
DescriptorProtos.FileDescriptorProto.Builder

addProtoFileBuilder(int index)

public DescriptorProtos.FileDescriptorProto.Builder addProtoFileBuilder(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;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.FileDescriptorProto.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PluginProtos.CodeGeneratorRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

build()

public PluginProtos.CodeGeneratorRequest build()
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest

buildPartial()

public PluginProtos.CodeGeneratorRequest buildPartial()
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest

clear()

public PluginProtos.CodeGeneratorRequest.Builder clear()

Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

clearCompilerVersion()

public PluginProtos.CodeGeneratorRequest.Builder clearCompilerVersion()

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public PluginProtos.CodeGeneratorRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

clearFileToGenerate()

public PluginProtos.CodeGeneratorRequest.Builder clearFileToGenerate()

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;

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PluginProtos.CodeGeneratorRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)

TODO(jieluo): Clear it when all subclasses have implemented this method.

Parameter
NameDescription
oneofDescriptors.OneofDescriptor
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

clearParameter()

public PluginProtos.CodeGeneratorRequest.Builder clearParameter()

The generator parameter passed on the command-line.

optional string parameter = 2;

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

clearProtoFile()

public PluginProtos.CodeGeneratorRequest.Builder clearProtoFile()

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;

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

clone()

public PluginProtos.CodeGeneratorRequest.Builder clone()

Clones the Builder.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

getCompilerVersion()

public PluginProtos.Version getCompilerVersion()

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Returns
TypeDescription
PluginProtos.Version

The compilerVersion.

getCompilerVersionBuilder()

public PluginProtos.Version.Builder getCompilerVersionBuilder()

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Returns
TypeDescription
PluginProtos.Version.Builder

getCompilerVersionOrBuilder()

public PluginProtos.VersionOrBuilder getCompilerVersionOrBuilder()

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Returns
TypeDescription
PluginProtos.VersionOrBuilder

getDefaultInstanceForType()

public PluginProtos.CodeGeneratorRequest getDefaultInstanceForType()

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.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()

Get the message's type's descriptor. This differs from the getDescriptor() method of generated message classes in that this method is an abstract method of the Message interface whereas getDescriptor() is a static method of a specific class. They return the same thing.

Returns
TypeDescription
Descriptors.Descriptor
Overrides

getFileToGenerate(int index)

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;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The fileToGenerate at the given index.

getFileToGenerateBytes(int index)

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;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the fileToGenerate at the given index.

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;

Returns
TypeDescription
int

The count of fileToGenerate.

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;

Returns
TypeDescription
ProtocolStringList

A list containing the fileToGenerate.

getParameter()

public String getParameter()

The generator parameter passed on the command-line.

optional string parameter = 2;

Returns
TypeDescription
String

The parameter.

getParameterBytes()

public ByteString getParameterBytes()

The generator parameter passed on the command-line.

optional string parameter = 2;

Returns
TypeDescription
ByteString

The bytes for parameter.

getProtoFile(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.FileDescriptorProto

getProtoFileBuilder(int index)

public DescriptorProtos.FileDescriptorProto.Builder getProtoFileBuilder(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;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.FileDescriptorProto.Builder

getProtoFileBuilderList()

public List<DescriptorProtos.FileDescriptorProto.Builder> getProtoFileBuilderList()

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;

Returns
TypeDescription
List<Builder>

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;

Returns
TypeDescription
int

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. 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;

Returns
TypeDescription
List<FileDescriptorProto>

getProtoFileOrBuilder(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.FileDescriptorProtoOrBuilder

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. 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;

Returns
TypeDescription
List<? extends com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder>

hasCompilerVersion()

public boolean hasCompilerVersion()

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Returns
TypeDescription
boolean

Whether the compilerVersion field is set.

hasParameter()

public boolean hasParameter()

The generator parameter passed on the command-line.

optional string parameter = 2;

Returns
TypeDescription
boolean

Whether the parameter field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.

Returns
TypeDescription
GeneratedMessageV3.FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
TypeDescription
boolean
Overrides

mergeCompilerVersion(PluginProtos.Version value)

public PluginProtos.CodeGeneratorRequest.Builder mergeCompilerVersion(PluginProtos.Version value)

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Parameter
NameDescription
valuePluginProtos.Version
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PluginProtos.CodeGeneratorRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in extensionRegistry. Extensions not in the registry will be treated as unknown fields.

Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PluginProtos.CodeGeneratorRequest.Builder mergeFrom(Message other)

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++.

Parameter
NameDescription
otherMessage
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

mergeFrom(PluginProtos.CodeGeneratorRequest other)

public PluginProtos.CodeGeneratorRequest.Builder mergeFrom(PluginProtos.CodeGeneratorRequest other)
Parameter
NameDescription
otherPluginProtos.CodeGeneratorRequest
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PluginProtos.CodeGeneratorRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

removeProtoFile(int index)

public PluginProtos.CodeGeneratorRequest.Builder removeProtoFile(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;

Parameter
NameDescription
indexint
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

setCompilerVersion(PluginProtos.Version value)

public PluginProtos.CodeGeneratorRequest.Builder setCompilerVersion(PluginProtos.Version value)

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Parameter
NameDescription
valuePluginProtos.Version
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

setCompilerVersion(PluginProtos.Version.Builder builderForValue)

public PluginProtos.CodeGeneratorRequest.Builder setCompilerVersion(PluginProtos.Version.Builder builderForValue)

The version number of protocol compiler.

optional .google.protobuf.compiler.Version compiler_version = 3;

Parameter
NameDescription
builderForValuePluginProtos.Version.Builder
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public PluginProtos.CodeGeneratorRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

setFileToGenerate(int index, String value)

public PluginProtos.CodeGeneratorRequest.Builder setFileToGenerate(int index, String value)

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;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The fileToGenerate to set.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

setParameter(String value)

public PluginProtos.CodeGeneratorRequest.Builder setParameter(String value)

The generator parameter passed on the command-line.

optional string parameter = 2;

Parameter
NameDescription
valueString

The parameter to set.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

setParameterBytes(ByteString value)

public PluginProtos.CodeGeneratorRequest.Builder setParameterBytes(ByteString value)

The generator parameter passed on the command-line.

optional string parameter = 2;

Parameter
NameDescription
valueByteString

The bytes for parameter to set.

Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

This builder for chaining.

setProtoFile(int index, DescriptorProtos.FileDescriptorProto value)

public PluginProtos.CodeGeneratorRequest.Builder setProtoFile(int index, DescriptorProtos.FileDescriptorProto value)

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;

Parameters
NameDescription
indexint
valueDescriptorProtos.FileDescriptorProto
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

setProtoFile(int index, DescriptorProtos.FileDescriptorProto.Builder builderForValue)

public PluginProtos.CodeGeneratorRequest.Builder setProtoFile(int index, DescriptorProtos.FileDescriptorProto.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.FileDescriptorProto.Builder
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PluginProtos.CodeGeneratorRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
indexint
valueObject
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PluginProtos.CodeGeneratorRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PluginProtos.CodeGeneratorRequest.Builder
Overrides