Package com.google.protobuf
Class ProtobufToStringOutput
java.lang.Object
com.google.protobuf.ProtobufToStringOutput
ProtobufToStringOutput controls the output format of
Message.toString()
. Specifically,
for the Runnable object passed to `callWithDebugFormat` and `callWithTextFormat`,
Message.toString() will always output the specified format unless ProtobufToStringOutput is used
again to change the output format.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ThreadLocal
<ProtobufToStringOutput.OutputMode> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
callWithDebugFormat
(Runnable impl) private static void
static void
callWithTextFormat
(Runnable impl) private static ProtobufToStringOutput.OutputMode
static boolean
-
Field Details
-
outputMode
-
-
Constructor Details
-
ProtobufToStringOutput
private ProtobufToStringOutput()
-
-
Method Details
-
setOutputMode
private static ProtobufToStringOutput.OutputMode setOutputMode(ProtobufToStringOutput.OutputMode newMode) -
callWithSpecificFormat
-
callWithDebugFormat
-
callWithTextFormat
-
shouldOutputDebugFormat
public static boolean shouldOutputDebugFormat()
-