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
Name Description
messageType Descriptors.Descriptor
Returns
Type Description
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
Name Description
messageTypes Iterable<Descriptor>
Returns
Type Description
TypeRegistry.Builder

build()

public TypeRegistry build()

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

Returns
Type Description
TypeRegistry