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

newBuilder()

  public 
  
 static 
  
 TypeRegistry 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

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
Returns
Type
Description

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
Returns
Type
Description
Exceptions
Type
Description
Create a Mobile Website
View Site in Mobile | Classic
Share by: