Class Protobuf
java.lang.Object
com.google.protobuf.Protobuf
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Protobufprivate final ConcurrentMap<Class<?>, Schema<?>> private final ManifestSchemaFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ProtobufGets the singleton instance of the Protobuf runtime.(package private) <T extends GeneratedMessageLite<?,?>>
booleanisInitialized(T message) Checks if all required fields are set.(package private) <T extends GeneratedMessageLite<?,?>>
voidmergeFrom(T message, CodedInputStreamReader reader, ExtensionRegistryLite extensionRegistry) Reads fields from the givenCodedInputStreamReaderand merges them into the message.private <T extends GeneratedMessageLite<?,?>>
Schema<T> registerSchema(Class<T> messageType) (package private) <T extends GeneratedMessageLite<?,?>>
Schema<T> Gets the schema for the given message type.(package private) <T extends GeneratedMessageLite<?,?>>
Schema<T> schemaFor(T message) Gets the schema for the given message.(package private) <T extends GeneratedMessageLite<?,?>>
voidwriteTo(T message, CodedOutputStreamWriter writer) Writes the given message to the targetCodedOutputStreamWriter.
-
Field Details
-
INSTANCE
-
schemaFactory
-
schemaCache
-
-
Constructor Details
-
Protobuf
private Protobuf()
-
-
Method Details
-
getInstance
Gets the singleton instance of the Protobuf runtime. -
writeTo
<T extends GeneratedMessageLite<?,?>> void writeTo(T message, CodedOutputStreamWriter writer) throws IOException Writes the given message to the targetCodedOutputStreamWriter.- Throws:
IOException
-
mergeFrom
<T extends GeneratedMessageLite<?,?>> void mergeFrom(T message, CodedInputStreamReader reader, ExtensionRegistryLite extensionRegistry) throws IOException Reads fields from the givenCodedInputStreamReaderand merges them into the message.- Throws:
IOException
-
isInitialized
Checks if all required fields are set. -
schemaFor
Gets the schema for the given message type. -
registerSchema
-
schemaFor
Gets the schema for the given message.
-