Package com.google.protobuf
Class MessageLiteToString
java.lang.Object
com.google.protobuf.MessageLiteToString
Helps generate
String representations of MessageLite protos.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final StringcamelCaseToSnakeCase(String camelCase) private static boolean(package private) static final voidprintField(StringBuilder buffer, int indent, String name, Object object) Formats a text proto field.private static voidreflectivePrintWithIndent(MessageLite messageLite, StringBuilder buffer, int indent) Reflectively prints theMessageLiteto the buffer at givenindentlevel.(package private) static StringtoString(MessageLite messageLite, String commentString) Returns aStringrepresentation of theMessageLiteobject.
-
Field Details
-
LIST_SUFFIX
- See Also:
-
BUILDER_LIST_SUFFIX
- See Also:
-
MAP_SUFFIX
- See Also:
-
BYTES_SUFFIX
- See Also:
-
-
Constructor Details
-
MessageLiteToString
MessageLiteToString()
-
-
Method Details
-
toString
Returns aStringrepresentation of theMessageLiteobject. The first line of theStringrepresentation representation includes a comment string to uniquely identify the object instance. This acts as an indicator that this should not be relied on for comparisons.For use by generated code only.
-
reflectivePrintWithIndent
private static void reflectivePrintWithIndent(MessageLite messageLite, StringBuilder buffer, int indent) Reflectively prints theMessageLiteto the buffer at givenindentlevel.- Parameters:
buffer- the buffer to write toindent- the number of spaces to indent the proto by
-
isDefaultValue
-
printField
Formats a text proto field.For use by generated code only.
- Parameters:
buffer- the buffer to write toindent- the number of spaces the proto should be indented byname- the field name (in lower underscore case)object- the object value of the field
-
camelCaseToSnakeCase
-