public class Protobufs extends Object
| Constructor and Description |
|---|
Protobufs() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getAllFieldNames(com.google.protobuf.Message message)
Given a protobuf message object, return the list of all field names
|
static List<String> |
getAllFieldNamesToUpperCase(com.google.protobuf.Message message)
Given a protobuf message object, return the list of all fields names to upper case
|
static com.google.protobuf.Message |
getDefaultInstanceForProto(String proto,
String messageTypeName)
Given a protocol buffer message description as a string, and the message type name, returns
the default instance of the given message type.
|
static List<String> |
getDefinedFieldNames(com.google.protobuf.Message message)
Given a protobuf message object, return the list of fields names which have
value set in the object
|
static Object |
getValueForFieldName(com.google.protobuf.Message message,
String fieldName) |
public static List<String> getAllFieldNamesToUpperCase(com.google.protobuf.Message message)
message - protobuf objectpublic static List<String> getAllFieldNames(com.google.protobuf.Message message)
message - the protobuf objectpublic static List<String> getDefinedFieldNames(com.google.protobuf.Message message)
message - the protobuf objectpublic static Object getValueForFieldName(com.google.protobuf.Message message, String fieldName)
public static com.google.protobuf.Message getDefaultInstanceForProto(String proto, String messageTypeName) throws IOException, com.google.protobuf.Descriptors.DescriptorValidationException, ReflectiveOperationException
proto - protocol buffer message description as a stringmessageTypeName - the message type name to get the default instance forIOExceptioncom.google.protobuf.Descriptors.DescriptorValidationExceptionReflectiveOperationExceptionCopyright © 2015. All rights reserved.