Class TypeRegistry


  • public class TypeRegistry
    extends java.lang.Object
    A TypeRegistry is used to resolve Any messages. You must provide a TypeRegistry containing all message types used in Any message fields.
    • Method Detail

      • getEmptyTypeRegistry

        public static TypeRegistry getEmptyTypeRegistry()
      • getDescriptorForTypeUrl

        public final Descriptors.Descriptor getDescriptorForTypeUrl​(java.lang.String typeUrl)
                                                             throws com.google.protobuf.InvalidProtocolBufferException
        Find a type by its typeUrl. Returns null if it cannot be found in this TypeRegistry.
        Throws:
        com.google.protobuf.InvalidProtocolBufferException