final class MessageLiteToString
extends java.lang.Object
String
representations of MessageLite
protos.Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
BUILDER_LIST_SUFFIX |
private static java.lang.String |
BYTES_SUFFIX |
private static java.lang.String |
LIST_SUFFIX |
Constructor and Description |
---|
MessageLiteToString() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
camelCaseToSnakeCase(java.lang.String camelCase) |
private static boolean |
isDefaultValue(java.lang.Object o) |
(package private) static void |
printField(java.lang.StringBuilder buffer,
int indent,
java.lang.String name,
java.lang.Object object)
Formats a text proto field.
|
private static void |
reflectivePrintWithIndent(MessageLite messageLite,
java.lang.StringBuilder buffer,
int indent)
Reflectively prints the
MessageLite to the buffer at given indent level. |
(package private) static java.lang.String |
toString(MessageLite messageLite,
java.lang.String commentString)
Returns a
String representation of the MessageLite object. |
private static final java.lang.String LIST_SUFFIX
private static final java.lang.String BUILDER_LIST_SUFFIX
private static final java.lang.String BYTES_SUFFIX
static java.lang.String toString(MessageLite messageLite, java.lang.String commentString)
String
representation of the MessageLite
object. The first line of
the String
representation representation includes a comment string to uniquely identify
the objcet instance. This acts as an indicator that this should not be relied on for
comparisons.
For use by generated code only.
private static void reflectivePrintWithIndent(MessageLite messageLite, java.lang.StringBuilder buffer, int indent)
MessageLite
to the buffer at given indent
level.buffer
- the buffer to write toindent
- the number of spaces to indent the proto byprivate static boolean isDefaultValue(java.lang.Object o)
static final void printField(java.lang.StringBuilder buffer, int indent, java.lang.String name, java.lang.Object object)
For use by generated code only.
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 fieldprivate static final java.lang.String camelCaseToSnakeCase(java.lang.String camelCase)