ProtoUtil
  public
  
  
  
  class
  ProtoUtil
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.util.ProtoUtil | 
Utility methods for dealing with protobuf messages type-agnostically.
Summary
| Public constructors | |
|---|---|
| 
      ProtoUtil()
       | |
| Public methods | |
|---|---|
| 
        
        
        static
        
        
         | 
      getNestedFieldFromMessageAsStrings(Message message, Get values of a nested field reference, i.e. | 
Public constructors
ProtoUtil
public ProtoUtil ()
Public methods
getNestedFieldFromMessageAsStrings
public staticgetNestedFieldFromMessageAsStrings (Message message, references) 
Get values of a nested field reference, i.e. field_1.field_2.field_3, from a proto message as a list of strings. Returns an empty list when a field cannot be found.
If the field reference contains repeated fields, each instance is expanded, resulting in a list of strings.
| Parameters | |
|---|---|
| message | Message: The protobufMessageor object to be parsed. | 
| references | : A list of field references starting at the root of the message. e.g. if we
     want to readfield_2under the value offield_1inmessageOrObjectthe list would befield1,field2. | 
| Returns | |
|---|---|
|  | A list of all the fields values referred to by the reference. If referencesis empty, returnsmessage.toString()as a list. Ifreferencesis invalid,
     returns an empty list. | 
