…lines 1–7 unchanged (7 lines)
8package com.google.protobuf;
9
10import static com.google.protobuf.Internal.checkNotNull;
11
12import java.io.IOException;
13import java.util.concurrent.ConcurrentHashMap;
14import java.util.concurrent.ConcurrentMap;
15
16@ExperimentalApi
17@CheckReturnValue
18final class Protobuf {
19 private static final Protobuf INSTANCE = new Protobuf();
20
21 private final SchemaFactory schemaFactory;
22
23 // TODO: b/341207042 - Consider using ClassValue instead.
24 private final ConcurrentMap<Class<?>, Schema<?>> schemaCache =
25 new ConcurrentHashMap<Class<?>, Schema<?>>();
26
27 /** Gets the singleton instance of the Protobuf runtime. */
28 static Protobuf getInstance() {
29 return INSTANCE;
30 }
31
…lines 32–76 unchanged (45 lines)