Package com.google.protobuf.compiler
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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn encoded CodeGeneratorRequest is written to the plugin's stdin.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) The version number of protocol compiler.getFileToGenerate(int index) The .proto files that were explicitly listed on the command-line.com.google.protobuf.ByteStringgetFileToGenerateBytes(int index) The .proto files that were explicitly listed on the command-line.intThe .proto files that were explicitly listed on the command-line.The .proto files that were explicitly listed on the command-line.The generator parameter passed on the command-line.com.google.protobuf.ByteStringThe generator parameter passed on the command-line.getProtoFile(int index) FileDescriptorProtos for all files in files_to_generate and everything they import.intFileDescriptorProtos for all files in files_to_generate and everything they import.FileDescriptorProtos for all files in files_to_generate and everything they import.getProtoFileOrBuilder(int index) FileDescriptorProtos for all files in files_to_generate and everything they import.FileDescriptorProtos for all files in files_to_generate and everything they import.getSourceFileDescriptors(int index) File descriptors with all options, including source-retention options.intFile descriptors with all options, including source-retention options.File descriptors with all options, including source-retention options.getSourceFileDescriptorsOrBuilder(int index) File descriptors with all options, including source-retention options.File descriptors with all options, including source-retention options.booleanThe version number of protocol compiler.booleanThe generator parameter passed on the command-line.newBuilder(PluginProtos.CodeGeneratorRequest prototype) parseDelimitedFrom(InputStream input) 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) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<PluginProtos.CodeGeneratorRequest>parser()Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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
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:
getFileToGenerateListin interfacePluginProtos.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:
getFileToGenerateCountin interfacePluginProtos.CodeGeneratorRequestOrBuilder- Returns:
- The count of fileToGenerate.
-
getFileToGenerate
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:
getFileToGeneratein interfacePluginProtos.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:
getFileToGenerateBytesin interfacePluginProtos.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:
hasParameterin interfacePluginProtos.CodeGeneratorRequestOrBuilder- Returns:
- Whether the parameter field is set.
-
getParameter
The generator parameter passed on the command-line.
optional string parameter = 2 [json_name = "parameter"];- Specified by:
getParameterin interfacePluginProtos.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:
getParameterBytesin interfacePluginProtos.CodeGeneratorRequestOrBuilder- Returns:
- The bytes for parameter.
-
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:
getProtoFileListin interfacePluginProtos.CodeGeneratorRequestOrBuilder
-
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:
getProtoFileCountin interfacePluginProtos.CodeGeneratorRequestOrBuilder
-
getProtoFile
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:
getProtoFilein interfacePluginProtos.CodeGeneratorRequestOrBuilder
-
getProtoFileOrBuilder
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
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:
getSourceFileDescriptorsListin interfacePluginProtos.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:
getSourceFileDescriptorsCountin interfacePluginProtos.CodeGeneratorRequestOrBuilder
-
getSourceFileDescriptors
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:
getSourceFileDescriptorsin interfacePluginProtos.CodeGeneratorRequestOrBuilder
-
getSourceFileDescriptorsOrBuilder
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:
hasCompilerVersionin interfacePluginProtos.CodeGeneratorRequestOrBuilder- Returns:
- Whether the compilerVersion field is set.
-
getCompilerVersion
The version number of protocol compiler.
optional .google.protobuf.compiler.Version compiler_version = 3 [json_name = "compilerVersion"];- Specified by:
getCompilerVersionin interfacePluginProtos.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
- 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
-
newBuilder
public static PluginProtos.CodeGeneratorRequest.Builder newBuilder(PluginProtos.CodeGeneratorRequest prototype) -
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<PluginProtos.CodeGeneratorRequest,PluginProtos.CodeGeneratorRequest.Builder>
-
getDefaultInstance
-
parser
-