Package com.google.protobuf
Class TypeRegistry
java.lang.Object
com.google.protobuf.TypeRegistry
A TypeRegistry is used to resolve Any messages. You must provide a TypeRegistry containing all
message types used in Any message fields.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A Builder is used to buildTypeRegistry
.private static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFind a type by its full name.final Descriptors.Descriptor
getDescriptorForTypeUrl
(String typeUrl) Find a type by its typeUrl.static TypeRegistry
private static String
getTypeName
(String typeUrl) static TypeRegistry.Builder
-
Field Details
-
logger
-
types
-
-
Constructor Details
-
TypeRegistry
TypeRegistry(Map<String, Descriptors.Descriptor> types)
-
-
Method Details
-
getEmptyTypeRegistry
-
newBuilder
-
find
Find a type by its full name. Returns null if it cannot be found in thisTypeRegistry
. -
getDescriptorForTypeUrl
public final Descriptors.Descriptor getDescriptorForTypeUrl(String typeUrl) throws InvalidProtocolBufferException Find a type by its typeUrl. Returns null if it cannot be found in thisTypeRegistry
.- Throws:
InvalidProtocolBufferException
-
getTypeName
- Throws:
InvalidProtocolBufferException
-