public static final class PluginProtos.CodeGeneratorRequest extends com.google.protobuf.GeneratedMessageV3 implements PluginProtos.CodeGeneratorRequestOrBuilder
An encoded CodeGeneratorRequest is written to the plugin's stdin.Protobuf type
google.protobuf.compiler.CodeGeneratorRequest
Modifier and Type | Class and Description |
---|---|
static class |
PluginProtos.CodeGeneratorRequest.Builder
An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
COMPILER_VERSION_FIELD_NUMBER |
static int |
FILE_TO_GENERATE_FIELD_NUMBER |
static int |
PARAMETER_FIELD_NUMBER |
static Parser<PluginProtos.CodeGeneratorRequest> |
PARSER
Deprecated.
|
static int |
PROTO_FILE_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this message for equality.
|
PluginProtos.Version |
getCompilerVersion()
The version number of protocol compiler.
|
PluginProtos.VersionOrBuilder |
getCompilerVersionOrBuilder()
The version number of protocol compiler.
|
static PluginProtos.CodeGeneratorRequest |
getDefaultInstance() |
PluginProtos.CodeGeneratorRequest |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getFileToGenerate(int index)
The .proto files that were explicitly listed on the command-line.
|
ByteString |
getFileToGenerateBytes(int index)
The .proto files that were explicitly listed on the command-line.
|
int |
getFileToGenerateCount()
The .proto files that were explicitly listed on the command-line.
|
ProtocolStringList |
getFileToGenerateList()
The .proto files that were explicitly listed on the command-line.
|
java.lang.String |
getParameter()
The generator parameter passed on the command-line.
|
ByteString |
getParameterBytes()
The generator parameter passed on the command-line.
|
Parser<PluginProtos.CodeGeneratorRequest> |
getParserForType()
Gets the parser for a message of the same type as this message.
|
DescriptorProtos.FileDescriptorProto |
getProtoFile(int index)
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
int |
getProtoFileCount()
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
java.util.List<DescriptorProtos.FileDescriptorProto> |
getProtoFileList()
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
DescriptorProtos.FileDescriptorProtoOrBuilder |
getProtoFileOrBuilder(int index)
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
java.util.List<? extends DescriptorProtos.FileDescriptorProtoOrBuilder> |
getProtoFileOrBuilderList()
FileDescriptorProtos for all files in files_to_generate and everything
they import.
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
boolean |
hasCompilerVersion()
The version number of protocol compiler.
|
int |
hashCode()
Returns the hash code value for this message.
|
boolean |
hasParameter()
The generator parameter passed on the command-line.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded messages are set, false
otherwise.
|
static PluginProtos.CodeGeneratorRequest.Builder |
newBuilder() |
static PluginProtos.CodeGeneratorRequest.Builder |
newBuilder(PluginProtos.CodeGeneratorRequest prototype) |
PluginProtos.CodeGeneratorRequest.Builder |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
static PluginProtos.CodeGeneratorRequest |
parseDelimitedFrom(java.io.InputStream input) |
static PluginProtos.CodeGeneratorRequest |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(byte[] data) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(java.nio.ByteBuffer data) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(ByteString data) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(CodedInputStream input) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(java.io.InputStream input) |
static PluginProtos.CodeGeneratorRequest |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<PluginProtos.CodeGeneratorRequest> |
parser() |
PluginProtos.CodeGeneratorRequest.Builder |
toBuilder()
Constructs a builder initialized with the current message.
|
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output . |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
findInitializationErrors, getInitializationErrorString, toString
toByteArray, toByteString, writeDelimitedTo, writeTo
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int FILE_TO_GENERATE_FIELD_NUMBER
public static final int PARAMETER_FIELD_NUMBER
public static final int PROTO_FILE_FIELD_NUMBER
public static final int COMPILER_VERSION_FIELD_NUMBER
@Deprecated public static final Parser<PluginProtos.CodeGeneratorRequest> PARSER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
MessageOrBuilder
UnknownFieldSet
for this message.getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
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;
getFileToGenerateList
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getFileToGenerateCount
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getFileToGenerate
in interface PluginProtos.CodeGeneratorRequestOrBuilder
index
- The index of the element to return.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;
getFileToGenerateBytes
in interface PluginProtos.CodeGeneratorRequestOrBuilder
index
- The index of the value to return.public boolean hasParameter()
The generator parameter passed on the command-line.
optional string parameter = 2;
hasParameter
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public java.lang.String getParameter()
The generator parameter passed on the command-line.
optional string parameter = 2;
getParameter
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public ByteString getParameterBytes()
The generator parameter passed on the command-line.
optional string parameter = 2;
getParameterBytes
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getProtoFileList
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getProtoFileOrBuilderList
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getProtoFileCount
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getProtoFile
in interface PluginProtos.CodeGeneratorRequestOrBuilder
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;
getProtoFileOrBuilder
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public boolean hasCompilerVersion()
The version number of protocol compiler.
optional .google.protobuf.compiler.Version compiler_version = 3;
hasCompilerVersion
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public PluginProtos.Version getCompilerVersion()
The version number of protocol compiler.
optional .google.protobuf.compiler.Version compiler_version = 3;
getCompilerVersion
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public PluginProtos.VersionOrBuilder getCompilerVersionOrBuilder()
The version number of protocol compiler.
optional .google.protobuf.compiler.Version compiler_version = 3;
getCompilerVersionOrBuilder
in interface PluginProtos.CodeGeneratorRequestOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLite
output
. This does not flush or close the
stream.writeTo
in interface MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(java.lang.Object obj)
Message
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.equals
in interface Message
equals
in class AbstractMessage
obj
- object to be compared for equality with this messagetrue
if the specified object is equal to this messagepublic int hashCode()
Message
Object.hashCode()
is incorrect.hashCode
in interface Message
hashCode
in class AbstractMessage
Map.hashCode()
public static PluginProtos.CodeGeneratorRequest parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PluginProtos.CodeGeneratorRequest parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static PluginProtos.CodeGeneratorRequest parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static PluginProtos.CodeGeneratorRequest parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static PluginProtos.CodeGeneratorRequest parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static PluginProtos.CodeGeneratorRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public PluginProtos.CodeGeneratorRequest.Builder newBuilderForType()
MessageLite
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder()
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder(PluginProtos.CodeGeneratorRequest prototype)
public PluginProtos.CodeGeneratorRequest.Builder toBuilder()
MessageLite
toBuilder
in interface Message
toBuilder
in interface MessageLite
public static PluginProtos.CodeGeneratorRequest getDefaultInstance()
public static Parser<PluginProtos.CodeGeneratorRequest> parser()
public Parser<PluginProtos.CodeGeneratorRequest> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessageV3
public PluginProtos.CodeGeneratorRequest getDefaultInstanceForType()
MessageLiteOrBuilder
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.getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder