Package com.google.protobuf
Class StructuralMessageInfo
java.lang.Object
com.google.protobuf.StructuralMessageInfo
- All Implemented Interfaces:
MessageInfo
@ExperimentalApi
@CheckReturnValue
final class StructuralMessageInfo
extends Object
implements MessageInfo
Information for the layout of a protobuf message class. This describes all of the fields
contained within a message.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]
private final MessageLite
private final FieldInfo[]
private final boolean
private final ProtoSyntax
-
Constructor Summary
ConstructorsConstructorDescriptionStructuralMessageInfo
(ProtoSyntax syntax, boolean messageSetWireFormat, int[] checkInitialized, FieldInfo[] fields, Object defaultInstance) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint[]
An array of field numbers that need to be checked for isInitialized().Gets the default instance of this type.Gets the information for all fields within this message, sorted in ascending order by their field number.Gets the syntax for the message (e.g.boolean
Indicates whether or not the message should be represented with message set wire format.Helper method for creating a new builder forMessageInfo
.newBuilder
(int numFields) Helper method for creating a new builder forMessageInfo
.
-
Field Details
-
syntax
-
messageSetWireFormat
private final boolean messageSetWireFormat -
checkInitialized
private final int[] checkInitialized -
fields
-
defaultInstance
-
-
Constructor Details
-
StructuralMessageInfo
StructuralMessageInfo(ProtoSyntax syntax, boolean messageSetWireFormat, int[] checkInitialized, FieldInfo[] fields, Object defaultInstance) Constructor.- Parameters:
checkInitialized
- fields to check in isInitialized().fields
- the set of fields for the message, in field number order.
-
-
Method Details
-
getSyntax
Gets the syntax for the message (e.g. PROTO2, PROTO3).- Specified by:
getSyntax
in interfaceMessageInfo
-
isMessageSetWireFormat
public boolean isMessageSetWireFormat()Indicates whether or not the message should be represented with message set wire format.- Specified by:
isMessageSetWireFormat
in interfaceMessageInfo
-
getCheckInitialized
public int[] getCheckInitialized()An array of field numbers that need to be checked for isInitialized(). -
getFields
Gets the information for all fields within this message, sorted in ascending order by their field number. -
getDefaultInstance
Description copied from interface:MessageInfo
Gets the default instance of this type.- Specified by:
getDefaultInstance
in interfaceMessageInfo
-
newBuilder
Helper method for creating a new builder forMessageInfo
. -
newBuilder
Helper method for creating a new builder forMessageInfo
.
-