Class JavaFeaturesProto.JavaFeatures.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
com.google.protobuf.GeneratedMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
com.google.protobuf.JavaFeaturesProto.JavaFeatures.Builder
- All Implemented Interfaces:
JavaFeaturesProto.JavaFeaturesOrBuilder, Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable
- Enclosing class:
JavaFeaturesProto.JavaFeatures
public static final class JavaFeaturesProto.JavaFeatures.Builder
extends GeneratedMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
implements JavaFeaturesProto.JavaFeaturesOrBuilder
Protobuf type
pb.JavaFeatures-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate booleanprivate booleanprivate intprivate booleanprivate int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBuilder()privateBuilder(AbstractMessage.BuilderParent parent) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs the message based on the state of the Builder.LikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields.private voidclear()Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.Whether or not to treat an enum field as closed.Whether to nest the generated class in the generated file class.Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name.optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ...Get an instance of the type with no fields set.static final Descriptors.DescriptorGet the message's type's descriptor.booleanAllows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.booleanWhether or not to treat an enum field as closed.Whether to nest the generated class in the generated file class.booleanWhether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name.optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ...booleanAllows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.booleanWhether or not to treat an enum field as closed.booleanWhether to nest the generated class in the generated file class.booleanWhether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name.booleanoptional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ...protected GeneratedMessage.FieldAccessorTableGet the FieldAccessorTable for this type.final booleanReturns true if all required fields in the message and all embedded messages are set, false otherwise.mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) LikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions.Mergeotherinto the message being built.setLargeEnum(boolean value) Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.setLegacyClosedEnum(boolean value) Whether or not to treat an enum field as closed.Whether to nest the generated class in the generated file class.setUseOldOuterClassnameDefault(boolean value) Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name.optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ...Methods inherited from class GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, dispose, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface MessageLite.Builder
mergeFromMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
bitField0_
private int bitField0_ -
legacyClosedEnum_
private boolean legacyClosedEnum_ -
utf8Validation_
private int utf8Validation_ -
largeEnum_
private boolean largeEnum_ -
useOldOuterClassnameDefault_
private boolean useOldOuterClassnameDefault_ -
nestInFileClass_
private int nestInFileClass_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
-
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
Description copied from class:GeneratedMessage.BuilderGet the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.- Specified by:
internalGetFieldAccessorTablein classGeneratedMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
-
clear
Description copied from class:GeneratedMessage.BuilderCalled by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
-
getDescriptorForType
Description copied from interface:Message.BuilderGet the message's type's descriptor. SeeMessageOrBuilder.getDescriptorForType().- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
-
getDefaultInstanceForType
Description copied from interface:MessageLiteOrBuilderGet 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 thegetDefaultInstance()method of generated message classes in that this method is an abstract method of theMessageLiteinterface whereasgetDefaultInstance()is a static method of a specific class. They return the same thing.- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
Description copied from interface:MessageLite.BuilderConstructs the message based on the state of the Builder. Subsequent changes to the Builder will not affect the returned message.- Specified by:
buildin interfaceMessage.Builder- Specified by:
buildin interfaceMessageLite.Builder
-
buildPartial
Description copied from interface:MessageLite.BuilderLikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned. Subsequent changes to the Builder will not affect the returned message.- Specified by:
buildPartialin interfaceMessage.Builder- Specified by:
buildPartialin interfaceMessageLite.Builder
-
buildPartial0
-
mergeFrom
Description copied from interface:Message.BuilderMergeotherinto the message being built.othermust have the exact same type asthis(i.e.getDescriptorForType() == other.getDescriptorForType()).Merging occurs as follows. For each field:
* For singular primitive fields, if the field is set inother, thenother's value overwrites the value in this message.
* For singular message fields, if the field is set inother, it is merged into the corresponding sub-message of this message using the same merging rules.
* For repeated fields, the elements inotherare 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::MergeFrommethod in C++.- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()Description copied from interface:MessageLiteOrBuilderReturns true if all required fields in the message and all embedded messages are set, false otherwise.- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>
-
mergeFrom
public JavaFeaturesProto.JavaFeatures.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException Description copied from interface:MessageLite.BuilderLikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered inextensionRegistry. Extensions not in the registry will be treated as unknown fields.- Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<JavaFeaturesProto.JavaFeatures.Builder>- Throws:
IOException- an I/O error reading from the stream
-
hasLegacyClosedEnum
public boolean hasLegacyClosedEnum()Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields.
optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
hasLegacyClosedEnumin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- Whether the legacyClosedEnum field is set.
-
getLegacyClosedEnum
public boolean getLegacyClosedEnum()Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields.
optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
getLegacyClosedEnumin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- The legacyClosedEnum.
-
setLegacyClosedEnum
Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields.
optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Parameters:
value- The legacyClosedEnum to set.- Returns:
- This builder for chaining.
-
clearLegacyClosedEnum
Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields.
optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Returns:
- This builder for chaining.
-
hasUtf8Validation
public boolean hasUtf8Validation()optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
hasUtf8Validationin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- Whether the utf8Validation field is set.
-
getUtf8Validation
optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
getUtf8Validationin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- The utf8Validation.
-
setUtf8Validation
public JavaFeaturesProto.JavaFeatures.Builder setUtf8Validation(JavaFeaturesProto.JavaFeatures.Utf8Validation value) optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Parameters:
value- The utf8Validation to set.- Returns:
- This builder for chaining.
-
clearUtf8Validation
optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Returns:
- This builder for chaining.
-
hasLargeEnum
public boolean hasLargeEnum()Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.
optional bool large_enum = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
hasLargeEnumin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- Whether the largeEnum field is set.
-
getLargeEnum
public boolean getLargeEnum()Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.
optional bool large_enum = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
getLargeEnumin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- The largeEnum.
-
setLargeEnum
Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.
optional bool large_enum = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Parameters:
value- The largeEnum to set.- Returns:
- This builder for chaining.
-
clearLargeEnum
Allows creation of large Java enums, extending beyond the standard constant limits imposed by the Java language.
optional bool large_enum = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Returns:
- This builder for chaining.
-
hasUseOldOuterClassnameDefault
public boolean hasUseOldOuterClassnameDefault()Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name. Users will not be able to set this option, because we removed it in the same edition that it was introduced. But we use it to determine which naming scheme to use for outer class name defaults.
optional bool use_old_outer_classname_default = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
hasUseOldOuterClassnameDefaultin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- Whether the useOldOuterClassnameDefault field is set.
-
getUseOldOuterClassnameDefault
public boolean getUseOldOuterClassnameDefault()Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name. Users will not be able to set this option, because we removed it in the same edition that it was introduced. But we use it to determine which naming scheme to use for outer class name defaults.
optional bool use_old_outer_classname_default = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Specified by:
getUseOldOuterClassnameDefaultin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- The useOldOuterClassnameDefault.
-
setUseOldOuterClassnameDefault
Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name. Users will not be able to set this option, because we removed it in the same edition that it was introduced. But we use it to determine which naming scheme to use for outer class name defaults.
optional bool use_old_outer_classname_default = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Parameters:
value- The useOldOuterClassnameDefault to set.- Returns:
- This builder for chaining.
-
clearUseOldOuterClassnameDefault
Whether to use the old default outer class name scheme, or the new feature which adds a "Proto" suffix to the outer class name. Users will not be able to set this option, because we removed it in the same edition that it was introduced. But we use it to determine which naming scheme to use for outer class name defaults.
optional bool use_old_outer_classname_default = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FILE, edition_defaults = { ... }- Returns:
- This builder for chaining.
-
hasNestInFileClass
public boolean hasNestInFileClass()Whether to nest the generated class in the generated file class. This is only applicable to *top-level* messages, enums, and services.
optional .pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_SERVICE, edition_defaults = { ... }- Specified by:
hasNestInFileClassin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- Whether the nestInFileClass field is set.
-
getNestInFileClass
Whether to nest the generated class in the generated file class. This is only applicable to *top-level* messages, enums, and services.
optional .pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_SERVICE, edition_defaults = { ... }- Specified by:
getNestInFileClassin interfaceJavaFeaturesProto.JavaFeaturesOrBuilder- Returns:
- The nestInFileClass.
-
setNestInFileClass
public JavaFeaturesProto.JavaFeatures.Builder setNestInFileClass(JavaFeaturesProto.JavaFeatures.NestInFileClassFeature.NestInFileClass value) Whether to nest the generated class in the generated file class. This is only applicable to *top-level* messages, enums, and services.
optional .pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_SERVICE, edition_defaults = { ... }- Parameters:
value- The nestInFileClass to set.- Returns:
- This builder for chaining.
-
clearNestInFileClass
Whether to nest the generated class in the generated file class. This is only applicable to *top-level* messages, enums, and services.
optional .pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_SERVICE, edition_defaults = { ... }- Returns:
- This builder for chaining.
-