public static final class DescriptorProtos.FileOptions extends GeneratedMessage.ExtendableMessage <DescriptorProtos .FileOptions > implements DescriptorProtos .FileOptionsOrBuilder
google.protobuf.FileOptions
| Modifier and Type | Class and Description |
|---|---|
static class |
DescriptorProtos
Protobuf type
google.protobuf.FileOptions
|
static class |
DescriptorProtos
Protobuf enum
google.protobuf.FileOptions.OptimizeMode
|
GeneratedMessage.ExtendableMessage.ExtensionWriter GeneratedMessage.BuilderParent , GeneratedMessage.ExtendableBuilder <MessageType extends GeneratedMessage.ExtendableMessage ,BuilderType extends GeneratedMessage.ExtendableBuilder >, GeneratedMessage.ExtendableMessage <MessageType extends GeneratedMessage.ExtendableMessage >, GeneratedMessage.ExtendableMessageOrBuilder <MessageType extends GeneratedMessage.ExtendableMessage >, GeneratedMessage.FieldAccessorTable , GeneratedMessage.GeneratedExtension <ContainingType extends Message,Type> | Modifier and Type | Field and Description |
|---|---|
static int |
CC_GENERIC_SERVICES_FIELD_NUMBER
|
static int |
DEPRECATED_FIELD_NUMBER
|
static int |
GO_PACKAGE_FIELD_NUMBER
|
static int |
JAVA_GENERATE_EQUALS_AND_HASH_FIELD_NUMBER
|
static int |
JAVA_GENERIC_SERVICES_FIELD_NUMBER
|
static int |
JAVA_MULTIPLE_FILES_FIELD_NUMBER
|
static int |
JAVA_OUTER_CLASSNAME_FIELD_NUMBER
|
static int |
JAVA_PACKAGE_FIELD_NUMBER
|
static int |
JAVA_STRING_CHECK_UTF8_FIELD_NUMBER
|
static int |
OPTIMIZE_FOR_FIELD_NUMBER
|
static Parser |
PARSER
|
static int |
PY_GENERIC_SERVICES_FIELD_NUMBER
|
static int |
UNINTERPRETED_OPTION_FIELD_NUMBER
|
alwaysUseFieldBuildersmemoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
getCcGenericServices()
optional bool cc_generic_services = 16 [default = false];
|
static DescriptorProtos |
getDefaultInstance()
|
DescriptorProtos |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
boolean |
getDeprecated()
optional bool deprecated = 23 [default = false];
|
static Descriptors |
getDescriptor()
|
String |
getGoPackage()
optional string go_package = 11;
|
ByteString |
getGoPackageBytes()
optional string go_package = 11;
|
boolean |
getJavaGenerateEqualsAndHash()
optional bool java_generate_equals_and_hash = 20 [default = false];
|
boolean |
getJavaGenericServices()
optional bool java_generic_services = 17 [default = false];
|
boolean |
getJavaMultipleFiles()
optional bool java_multiple_files = 10 [default = false];
|
String |
getJavaOuterClassname()
optional string java_outer_classname = 8;
|
ByteString |
getJavaOuterClassnameBytes()
optional string java_outer_classname = 8;
|
String |
getJavaPackage()
optional string java_package = 1;
|
ByteString |
getJavaPackageBytes()
optional string java_package = 1;
|
boolean |
getJavaStringCheckUtf8()
optional bool java_string_check_utf8 = 27 [default = false];
|
DescriptorProtos |
getOptimizeFor()
optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
|
Parser |
getParserForType()
Gets the parser for a message of the same type as this message.
|
boolean |
getPyGenericServices()
optional bool py_generic_services = 18 [default = false];
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
DescriptorProtos |
getUninterpretedOption(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
|
int |
getUninterpretedOptionCount()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
|
List |
getUninterpretedOptionList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
|
DescriptorProtos |
getUninterpretedOptionOrBuilder(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
|
List |
getUninterpretedOptionOrBuilderList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
|
UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message.
|
boolean |
hasCcGenericServices()
optional bool cc_generic_services = 16 [default = false];
|
boolean |
hasDeprecated()
optional bool deprecated = 23 [default = false];
|
boolean |
hasGoPackage()
optional string go_package = 11;
|
boolean |
hasJavaGenerateEqualsAndHash()
optional bool java_generate_equals_and_hash = 20 [default = false];
|
boolean |
hasJavaGenericServices()
optional bool java_generic_services = 17 [default = false];
|
boolean |
hasJavaMultipleFiles()
optional bool java_multiple_files = 10 [default = false];
|
boolean |
hasJavaOuterClassname()
optional string java_outer_classname = 8;
|
boolean |
hasJavaPackage()
optional string java_package = 1;
|
boolean |
hasJavaStringCheckUtf8()
optional bool java_string_check_utf8 = 27 [default = false];
|
boolean |
hasOptimizeFor()
optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
|
boolean |
hasPyGenericServices()
optional bool py_generic_services = 18 [default = false];
|
protected GeneratedMessage |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded messages are set, false otherwise.
|
static DescriptorProtos |
newBuilder()
|
static DescriptorProtos |
newBuilder(DescriptorProtos
|
DescriptorProtos |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
protected DescriptorProtos |
newBuilderForType(GeneratedMessage
|
static DescriptorProtos |
parseDelimitedFrom(InputStream
|
static DescriptorProtos |
parseDelimitedFrom(InputStream
|
static DescriptorProtos |
parseFrom(byte[] data)
|
static DescriptorProtos |
parseFrom(byte[] data, ExtensionRegistryLite
|
static DescriptorProtos |
parseFrom(ByteString
|
static DescriptorProtos |
parseFrom(ByteString
|
static DescriptorProtos |
parseFrom(CodedInputStream
|
static DescriptorProtos |
parseFrom(CodedInputStream
|
static DescriptorProtos |
parseFrom(InputStream
|
static DescriptorProtos |
parseFrom(InputStream
|
DescriptorProtos |
toBuilder()
Constructs a builder initialized with the current message.
|
protected Object |
writeReplace()
Replaces this object in the output stream with a serialized form.
|
void |
writeTo(CodedOutputStream
Serializes the message and writes it to
output.
|
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, makeExtensionsImmutable, newExtensionWriter, newMessageSetExtensionWriter, parseUnknownFieldgetDescriptorForType, getOneofFieldDescriptor, hasOneof, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtensionequals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toStringcheckByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetExtension, getExtension, getExtensionCount, hasExtensionfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static Parser<DescriptorProtos .FileOptions > PARSER
public static final int JAVA_PACKAGE_FIELD_NUMBER
public static final int JAVA_OUTER_CLASSNAME_FIELD_NUMBER
public static final int JAVA_MULTIPLE_FILES_FIELD_NUMBER
public static final int JAVA_GENERATE_EQUALS_AND_HASH_FIELD_NUMBER
public static final int JAVA_STRING_CHECK_UTF8_FIELD_NUMBER
public static final int OPTIMIZE_FOR_FIELD_NUMBER
public static final int GO_PACKAGE_FIELD_NUMBER
public static final int CC_GENERIC_SERVICES_FIELD_NUMBER
public static final int JAVA_GENERIC_SERVICES_FIELD_NUMBER
public static final int PY_GENERIC_SERVICES_FIELD_NUMBER
public static final int DEPRECATED_FIELD_NUMBER
public static final int UNINTERPRETED_OPTION_FIELD_NUMBER
public static DescriptorProtos.FileOptions getDefaultInstance()
public DescriptorProtos.FileOptions 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.
public final UnknownFieldSetgetUnknownFields()
MessageOrBuilder
UnknownFieldSet for this message.
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessage
public Parser<DescriptorProtos .FileOptions > getParserForType()
MessageLite
public boolean hasJavaPackage()
optional string java_package = 1;
Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.
public StringgetJavaPackage()
optional string java_package = 1;
Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.
public ByteStringgetJavaPackageBytes()
optional string java_package = 1;
Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.
public boolean hasJavaOuterClassname()
optional string java_outer_classname = 8;
If set, all the classes from the .proto file are wrapped in a single outer class with the given name. This applies to both Proto1 (equivalent to the old "--one_java_file" option) and Proto2 (where a .proto always translates to a single class, but you may want to explicitly choose the class name).
public StringgetJavaOuterClassname()
optional string java_outer_classname = 8;
If set, all the classes from the .proto file are wrapped in a single outer class with the given name. This applies to both Proto1 (equivalent to the old "--one_java_file" option) and Proto2 (where a .proto always translates to a single class, but you may want to explicitly choose the class name).
public ByteStringgetJavaOuterClassnameBytes()
optional string java_outer_classname = 8;
If set, all the classes from the .proto file are wrapped in a single outer class with the given name. This applies to both Proto1 (equivalent to the old "--one_java_file" option) and Proto2 (where a .proto always translates to a single class, but you may want to explicitly choose the class name).
public boolean hasJavaMultipleFiles()
optional bool java_multiple_files = 10 [default = false];
If set true, then the Java code generator will generate a separate .java file for each top-level message, enum, and service defined in the .proto file. Thus, these types will *not* be nested inside the outer class named by java_outer_classname. However, the outer class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.
public boolean getJavaMultipleFiles()
optional bool java_multiple_files = 10 [default = false];
If set true, then the Java code generator will generate a separate .java file for each top-level message, enum, and service defined in the .proto file. Thus, these types will *not* be nested inside the outer class named by java_outer_classname. However, the outer class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.
public boolean hasJavaGenerateEqualsAndHash()
optional bool java_generate_equals_and_hash = 20 [default = false];
If set true, then the Java code generator will generate equals() and hashCode() methods for all messages defined in the .proto file. - In the full runtime, this is purely a speed optimization, as the AbstractMessage base class includes reflection-based implementations of these methods. - In the lite runtime, setting this option changes the semantics of equals() and hashCode() to more closely match those of the full runtime; the generated methods compute their results based on field values rather than object identity. (Implementations should not assume that hashcodes will be consistent across runtimes or versions of the protocol compiler.)
public boolean getJavaGenerateEqualsAndHash()
optional bool java_generate_equals_and_hash = 20 [default = false];
If set true, then the Java code generator will generate equals() and hashCode() methods for all messages defined in the .proto file. - In the full runtime, this is purely a speed optimization, as the AbstractMessage base class includes reflection-based implementations of these methods. - In the lite runtime, setting this option changes the semantics of equals() and hashCode() to more closely match those of the full runtime; the generated methods compute their results based on field values rather than object identity. (Implementations should not assume that hashcodes will be consistent across runtimes or versions of the protocol compiler.)
public boolean hasJavaStringCheckUtf8()
optional bool java_string_check_utf8 = 27 [default = false];
If set true, then the Java2 code generator will generate code that throws an exception whenever an attempt is made to assign a non-UTF-8 byte sequence to a string field. Message reflection will do the same. However, an extension field still accepts non-UTF-8 byte sequences. This option has no effect on when used with the lite runtime.
public boolean getJavaStringCheckUtf8()
optional bool java_string_check_utf8 = 27 [default = false];
If set true, then the Java2 code generator will generate code that throws an exception whenever an attempt is made to assign a non-UTF-8 byte sequence to a string field. Message reflection will do the same. However, an extension field still accepts non-UTF-8 byte sequences. This option has no effect on when used with the lite runtime.
public boolean hasOptimizeFor()
optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
public DescriptorProtos.FileOptions .OptimizeMode getOptimizeFor()
optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
public boolean hasGoPackage()
optional string go_package = 11;
Sets the Go package where structs generated from this .proto will be placed. There is no default.
public StringgetGoPackage()
optional string go_package = 11;
Sets the Go package where structs generated from this .proto will be placed. There is no default.
public ByteStringgetGoPackageBytes()
optional string go_package = 11;
Sets the Go package where structs generated from this .proto will be placed. There is no default.
public boolean hasCcGenericServices()
optional bool cc_generic_services = 16 [default = false];
Should generic services be generated in each language? "Generic" services are not specific to any particular RPC system. They are generated by the main code generators in each language (without additional plugins). Generic services were the only kind of service generation supported by early versions of proto2. Generic services are now considered deprecated in favor of using plugins that generate code specific to your particular RPC system. Therefore, these default to false. Old code which depends on generic services should explicitly set them to true.
public boolean getCcGenericServices()
optional bool cc_generic_services = 16 [default = false];
Should generic services be generated in each language? "Generic" services are not specific to any particular RPC system. They are generated by the main code generators in each language (without additional plugins). Generic services were the only kind of service generation supported by early versions of proto2. Generic services are now considered deprecated in favor of using plugins that generate code specific to your particular RPC system. Therefore, these default to false. Old code which depends on generic services should explicitly set them to true.
public boolean hasJavaGenericServices()
optional bool java_generic_services = 17 [default = false];
public boolean getJavaGenericServices()
optional bool java_generic_services = 17 [default = false];
public boolean hasPyGenericServices()
optional bool py_generic_services = 18 [default = false];
public boolean getPyGenericServices()
optional bool py_generic_services = 18 [default = false];
public boolean hasDeprecated()
optional bool deprecated = 23 [default = false];
Is this file deprecated? Depending on the target platform, this can emit Deprecated annotations for everything in the file, or it will be completely ignored; in the very least, this is a formalization for deprecating files.
public boolean getDeprecated()
optional bool deprecated = 23 [default = false];
Is this file deprecated? Depending on the target platform, this can emit Deprecated annotations for everything in the file, or it will be completely ignored; in the very least, this is a formalization for deprecating files.
public List<DescriptorProtos .UninterpretedOption > getUninterpretedOptionList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
public List<? extends DescriptorProtos .UninterpretedOptionOrBuilder > getUninterpretedOptionOrBuilderList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
public int getUninterpretedOptionCount()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
public final boolean isInitialized()
MessageLiteOrBuilder
public void writeTo(CodedOutputStreamoutput) throws IOException
MessageLite
output. This does not flush or close the stream.
writeTo in interface
MessageLite
writeTo in class
AbstractMessage
IOException
public int getSerializedSize()
MessageLite
protected ObjectwriteReplace() throws ObjectStreamException
GeneratedMessage
return super.writeReplace();
writeReplace in class
GeneratedMessage
ObjectStreamException
public static DescriptorProtos.FileOptions parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileOptions parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileOptions parseFrom(InputStream input) throws IOException
IOException
public static DescriptorProtos.FileOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static DescriptorProtos.FileOptions parseDelimitedFrom(InputStream input) throws IOException
IOException
public static DescriptorProtos.FileOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static DescriptorProtos.FileOptions parseFrom(CodedInputStream input) throws IOException
IOException
public static DescriptorProtos.FileOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static DescriptorProtos.FileOptions .Builder newBuilder()
public DescriptorProtos.FileOptions .Builder newBuilderForType()
MessageLite
public static DescriptorProtos.FileOptions .Builder newBuilder(DescriptorProtos .FileOptions prototype)
public DescriptorProtos.FileOptions .Builder toBuilder()
MessageLite
protected DescriptorProtos.FileOptions .Builder newBuilderForType(GeneratedMessage .BuilderParent parent)