Class DescriptorProtos.FileOptions (3.19.4)

public static final class DescriptorProtos.FileOptions extends GeneratedMessageV3.ExtendableMessage<DescriptorProtos.FileOptions> implements DescriptorProtos.FileOptionsOrBuilder

Protobuf type google.protobuf.FileOptions

Static Fields

CC_ENABLE_ARENAS_FIELD_NUMBER

public static final int CC_ENABLE_ARENAS_FIELD_NUMBER
Field Value
TypeDescription
int

CC_GENERIC_SERVICES_FIELD_NUMBER

public static final int CC_GENERIC_SERVICES_FIELD_NUMBER
Field Value
TypeDescription
int

CSHARP_NAMESPACE_FIELD_NUMBER

public static final int CSHARP_NAMESPACE_FIELD_NUMBER
Field Value
TypeDescription
int

DEPRECATED_FIELD_NUMBER

public static final int DEPRECATED_FIELD_NUMBER
Field Value
TypeDescription
int

GO_PACKAGE_FIELD_NUMBER

public static final int GO_PACKAGE_FIELD_NUMBER
Field Value
TypeDescription
int

JAVA_GENERATE_EQUALS_AND_HASH_FIELD_NUMBER

public static final int JAVA_GENERATE_EQUALS_AND_HASH_FIELD_NUMBER
Field Value
TypeDescription
int

JAVA_GENERIC_SERVICES_FIELD_NUMBER

public static final int JAVA_GENERIC_SERVICES_FIELD_NUMBER
Field Value
TypeDescription
int

JAVA_MULTIPLE_FILES_FIELD_NUMBER

public static final int JAVA_MULTIPLE_FILES_FIELD_NUMBER
Field Value
TypeDescription
int

JAVA_OUTER_CLASSNAME_FIELD_NUMBER

public static final int JAVA_OUTER_CLASSNAME_FIELD_NUMBER
Field Value
TypeDescription
int

JAVA_PACKAGE_FIELD_NUMBER

public static final int JAVA_PACKAGE_FIELD_NUMBER
Field Value
TypeDescription
int

JAVA_STRING_CHECK_UTF8_FIELD_NUMBER

public static final int JAVA_STRING_CHECK_UTF8_FIELD_NUMBER
Field Value
TypeDescription
int

OBJC_CLASS_PREFIX_FIELD_NUMBER

public static final int OBJC_CLASS_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

OPTIMIZE_FOR_FIELD_NUMBER

public static final int OPTIMIZE_FOR_FIELD_NUMBER
Field Value
TypeDescription
int

PARSER

public static final Parser<DescriptorProtos.FileOptions> PARSER
Field Value
TypeDescription
Parser<FileOptions>

PHP_CLASS_PREFIX_FIELD_NUMBER

public static final int PHP_CLASS_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

PHP_GENERIC_SERVICES_FIELD_NUMBER

public static final int PHP_GENERIC_SERVICES_FIELD_NUMBER
Field Value
TypeDescription
int

PHP_METADATA_NAMESPACE_FIELD_NUMBER

public static final int PHP_METADATA_NAMESPACE_FIELD_NUMBER
Field Value
TypeDescription
int

PHP_NAMESPACE_FIELD_NUMBER

public static final int PHP_NAMESPACE_FIELD_NUMBER
Field Value
TypeDescription
int

PY_GENERIC_SERVICES_FIELD_NUMBER

public static final int PY_GENERIC_SERVICES_FIELD_NUMBER
Field Value
TypeDescription
int

RUBY_PACKAGE_FIELD_NUMBER

public static final int RUBY_PACKAGE_FIELD_NUMBER
Field Value
TypeDescription
int

SWIFT_PREFIX_FIELD_NUMBER

public static final int SWIFT_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

UNINTERPRETED_OPTION_FIELD_NUMBER

public static final int UNINTERPRETED_OPTION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DescriptorProtos.FileOptions getDefaultInstance()
Returns
TypeDescription
DescriptorProtos.FileOptions

getDescriptor()

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

newBuilder()

public static DescriptorProtos.FileOptions.Builder newBuilder()
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

newBuilder(DescriptorProtos.FileOptions prototype)

public static DescriptorProtos.FileOptions.Builder newBuilder(DescriptorProtos.FileOptions prototype)
Parameter
NameDescription
prototypeDescriptorProtos.FileOptions
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

parseDelimitedFrom(InputStream input)

public static DescriptorProtos.FileOptions parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DescriptorProtos.FileOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DescriptorProtos.FileOptions parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DescriptorProtos.FileOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DescriptorProtos.FileOptions parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DescriptorProtos.FileOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DescriptorProtos.FileOptions parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DescriptorProtos.FileOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DescriptorProtos.FileOptions parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DescriptorProtos.FileOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DescriptorProtos.FileOptions parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DescriptorProtos.FileOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DescriptorProtos.FileOptions> parser()
Returns
TypeDescription
Parser<FileOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)

Compares the specified object with this message for equality. Returns 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.

Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCcEnableArenas()

public boolean getCcEnableArenas()

Enables the use of arenas for the proto messages in this file. This applies only to generated classes for C++.

optional bool cc_enable_arenas = 31 [default = true];

Returns
TypeDescription
boolean

The ccEnableArenas.

getCcGenericServices()

public boolean getCcGenericServices()

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 google.protobuf. 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.

optional bool cc_generic_services = 16 [default = false];

Returns
TypeDescription
boolean

The ccGenericServices.

getCsharpNamespace()

public String getCsharpNamespace()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
String

The csharpNamespace.

getCsharpNamespaceBytes()

public ByteString getCsharpNamespaceBytes()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
ByteString

The bytes for csharpNamespace.

getDefaultInstanceForType()

public DescriptorProtos.FileOptions 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
DescriptorProtos.FileOptions

getDeprecated()

public boolean getDeprecated()

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.

optional bool deprecated = 23 [default = false];

Returns
TypeDescription
boolean

The deprecated.

getGoPackage()

public String getGoPackage()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
String

The goPackage.

getGoPackageBytes()

public ByteString getGoPackageBytes()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
ByteString

The bytes for goPackage.

getJavaGenerateEqualsAndHash()

public boolean getJavaGenerateEqualsAndHash()

This option does nothing.

optional bool java_generate_equals_and_hash = 20 [deprecated = true];

Returns
TypeDescription
boolean

The javaGenerateEqualsAndHash.

getJavaGenericServices()

public boolean getJavaGenericServices()

optional bool java_generic_services = 17 [default = false];

Returns
TypeDescription
boolean

The javaGenericServices.

getJavaMultipleFiles()

public boolean getJavaMultipleFiles()

If enabled, 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 wrapper class named by java_outer_classname. However, the wrapper class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.

optional bool java_multiple_files = 10 [default = false];

Returns
TypeDescription
boolean

The javaMultipleFiles.

getJavaOuterClassname()

public String getJavaOuterClassname()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
String

The javaOuterClassname.

getJavaOuterClassnameBytes()

public ByteString getJavaOuterClassnameBytes()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
ByteString

The bytes for javaOuterClassname.

getJavaPackage()

public String getJavaPackage()

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.

optional string java_package = 1;

Returns
TypeDescription
String

The javaPackage.

getJavaPackageBytes()

public ByteString getJavaPackageBytes()

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.

optional string java_package = 1;

Returns
TypeDescription
ByteString

The bytes for javaPackage.

getJavaStringCheckUtf8()

public boolean getJavaStringCheckUtf8()

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.

optional bool java_string_check_utf8 = 27 [default = false];

Returns
TypeDescription
boolean

The javaStringCheckUtf8.

getObjcClassPrefix()

public String getObjcClassPrefix()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
String

The objcClassPrefix.

getObjcClassPrefixBytes()

public ByteString getObjcClassPrefixBytes()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
ByteString

The bytes for objcClassPrefix.

getOptimizeFor()

public DescriptorProtos.FileOptions.OptimizeMode getOptimizeFor()

optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];

Returns
TypeDescription
DescriptorProtos.FileOptions.OptimizeMode

The optimizeFor.

getParserForType()

public Parser<DescriptorProtos.FileOptions> getParserForType()
Returns
TypeDescription
Parser<FileOptions>
Overrides

getPhpClassPrefix()

public String getPhpClassPrefix()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
String

The phpClassPrefix.

getPhpClassPrefixBytes()

public ByteString getPhpClassPrefixBytes()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
ByteString

The bytes for phpClassPrefix.

getPhpGenericServices()

public boolean getPhpGenericServices()

optional bool php_generic_services = 42 [default = false];

Returns
TypeDescription
boolean

The phpGenericServices.

getPhpMetadataNamespace()

public String getPhpMetadataNamespace()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
String

The phpMetadataNamespace.

getPhpMetadataNamespaceBytes()

public ByteString getPhpMetadataNamespaceBytes()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
ByteString

The bytes for phpMetadataNamespace.

getPhpNamespace()

public String getPhpNamespace()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
String

The phpNamespace.

getPhpNamespaceBytes()

public ByteString getPhpNamespaceBytes()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
ByteString

The bytes for phpNamespace.

getPyGenericServices()

public boolean getPyGenericServices()

optional bool py_generic_services = 18 [default = false];

Returns
TypeDescription
boolean

The pyGenericServices.

getRubyPackage()

public String getRubyPackage()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
String

The rubyPackage.

getRubyPackageBytes()

public ByteString getRubyPackageBytes()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
ByteString

The bytes for rubyPackage.

getSerializedSize()

public int getSerializedSize()

Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that.

If this message requires more than Integer.MAX_VALUE bytes to encode, the return value will be smaller than the actual number of bytes required and might be negative.

Returns
TypeDescription
int
Overrides

getSwiftPrefix()

public String getSwiftPrefix()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
String

The swiftPrefix.

getSwiftPrefixBytes()

public ByteString getSwiftPrefixBytes()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
ByteString

The bytes for swiftPrefix.

getUninterpretedOption(int index)

public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption

getUninterpretedOptionCount()

public int getUninterpretedOptionCount()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
int

getUninterpretedOptionList()

public List<DescriptorProtos.UninterpretedOption> getUninterpretedOptionList()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
List<UninterpretedOption>

getUninterpretedOptionOrBuilder(int index)

public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOptionOrBuilder

getUninterpretedOptionOrBuilderList()

public List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

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

getUnknownFields()

public final UnknownFieldSet getUnknownFields()

Get the UnknownFieldSet for this message.

Returns
TypeDescription
UnknownFieldSet
Overrides

hasCcEnableArenas()

public boolean hasCcEnableArenas()

Enables the use of arenas for the proto messages in this file. This applies only to generated classes for C++.

optional bool cc_enable_arenas = 31 [default = true];

Returns
TypeDescription
boolean

Whether the ccEnableArenas field is set.

hasCcGenericServices()

public boolean hasCcGenericServices()

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 google.protobuf. 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.

optional bool cc_generic_services = 16 [default = false];

Returns
TypeDescription
boolean

Whether the ccGenericServices field is set.

hasCsharpNamespace()

public boolean hasCsharpNamespace()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
boolean

Whether the csharpNamespace field is set.

hasDeprecated()

public boolean hasDeprecated()

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.

optional bool deprecated = 23 [default = false];

Returns
TypeDescription
boolean

Whether the deprecated field is set.

hasGoPackage()

public boolean hasGoPackage()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
boolean

Whether the goPackage field is set.

hasJavaGenerateEqualsAndHash()

public boolean hasJavaGenerateEqualsAndHash()

This option does nothing.

optional bool java_generate_equals_and_hash = 20 [deprecated = true];

Returns
TypeDescription
boolean

Whether the javaGenerateEqualsAndHash field is set.

hasJavaGenericServices()

public boolean hasJavaGenericServices()

optional bool java_generic_services = 17 [default = false];

Returns
TypeDescription
boolean

Whether the javaGenericServices field is set.

hasJavaMultipleFiles()

public boolean hasJavaMultipleFiles()

If enabled, 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 wrapper class named by java_outer_classname. However, the wrapper class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.

optional bool java_multiple_files = 10 [default = false];

Returns
TypeDescription
boolean

Whether the javaMultipleFiles field is set.

hasJavaOuterClassname()

public boolean hasJavaOuterClassname()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
boolean

Whether the javaOuterClassname field is set.

hasJavaPackage()

public boolean hasJavaPackage()

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.

optional string java_package = 1;

Returns
TypeDescription
boolean

Whether the javaPackage field is set.

hasJavaStringCheckUtf8()

public boolean hasJavaStringCheckUtf8()

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.

optional bool java_string_check_utf8 = 27 [default = false];

Returns
TypeDescription
boolean

Whether the javaStringCheckUtf8 field is set.

hasObjcClassPrefix()

public boolean hasObjcClassPrefix()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
boolean

Whether the objcClassPrefix field is set.

hasOptimizeFor()

public boolean hasOptimizeFor()

optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];

Returns
TypeDescription
boolean

Whether the optimizeFor field is set.

hasPhpClassPrefix()

public boolean hasPhpClassPrefix()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
boolean

Whether the phpClassPrefix field is set.

hasPhpGenericServices()

public boolean hasPhpGenericServices()

optional bool php_generic_services = 42 [default = false];

Returns
TypeDescription
boolean

Whether the phpGenericServices field is set.

hasPhpMetadataNamespace()

public boolean hasPhpMetadataNamespace()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
boolean

Whether the phpMetadataNamespace field is set.

hasPhpNamespace()

public boolean hasPhpNamespace()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
boolean

Whether the phpNamespace field is set.

hasPyGenericServices()

public boolean hasPyGenericServices()

optional bool py_generic_services = 18 [default = false];

Returns
TypeDescription
boolean

Whether the pyGenericServices field is set.

hasRubyPackage()

public boolean hasRubyPackage()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
boolean

Whether the rubyPackage field is set.

hasSwiftPrefix()

public boolean hasSwiftPrefix()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
boolean

Whether the swiftPrefix field is set.

hashCode()

public int hashCode()

Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting Object.hashCode() is incorrect.

Returns
TypeDescription
int
Overrides

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

newBuilderForType()

public DescriptorProtos.FileOptions.Builder newBuilderForType()
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DescriptorProtos.FileOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)

TODO(xiaofeng): remove this together with GeneratedMessageV3.BuilderParent.

Parameter
NameDescription
parentGeneratedMessageV3.BuilderParent
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

Creates a new instance of this message type. Overridden in the generated code.

Parameter
NameDescription
unusedGeneratedMessageV3.UnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DescriptorProtos.FileOptions.Builder toBuilder()
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)

Serializes the message and writes it to output. This does not flush or close the stream.

Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException