Class TypeRegistry.Builder (3.19.4)

public static final class TypeRegistry.Builder

A Builder is used to build TypeRegistry.

Inheritance

java.lang.Object > TypeRegistry.Builder

Methods

add(Descriptors.Descriptor messageType)

public TypeRegistry.Builder add(Descriptors.Descriptor messageType)

Adds a message type and all types defined in the same .proto file as well as all transitively imported .proto files to this Builder.

Parameter
NameDescription
messageTypeDescriptors.Descriptor
Returns
TypeDescription
TypeRegistry.Builder

add(Iterable<Descriptors.Descriptor> messageTypes)

public TypeRegistry.Builder add(Iterable<Descriptors.Descriptor> messageTypes)

Adds message types and all types defined in the same .proto file as well as all transitively imported .proto files to this Builder.

Parameter
NameDescription
messageTypesIterable<Descriptor>
Returns
TypeDescription
TypeRegistry.Builder

build()

public TypeRegistry build()

Builds a TypeRegistry. This method can only be called once for one Builder.

Returns
TypeDescription
TypeRegistry