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