Class TypeRegistry (3.19.4)

public class TypeRegistry

A TypeRegistry is used to resolve Any messages. You must provide a TypeRegistry containing all message types used in Any message fields.

Inheritance

java.lang.Object > TypeRegistry

Static Methods

getEmptyTypeRegistry()

public static TypeRegistry getEmptyTypeRegistry()
Returns
Type Description
TypeRegistry

newBuilder()

public static TypeRegistry.Builder newBuilder()
Returns
Type Description
TypeRegistry.Builder

Methods

find(String name)

public Descriptors.Descriptor find(String name)

Find a type by its full name. Returns null if it cannot be found in this TypeRegistry.

Parameter
Name Description
name String
Returns
Type Description
Descriptors.Descriptor

getDescriptorForTypeUrl(String typeUrl)

public final Descriptors.Descriptor getDescriptorForTypeUrl(String typeUrl)

Find a type by its typeUrl. Returns null if it cannot be found in this TypeRegistry.

Parameter
Name Description
typeUrl String
Returns
Type Description
Descriptors.Descriptor
Exceptions
Type Description
InvalidProtocolBufferException