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 voidcallWithDebugFormat(Runnable impl) private static voidstatic voidcallWithTextFormat(Runnable impl) static booleanprivate static ProtobufToStringOutput.OutputModestatic 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() -
isDefaultFormat
public static boolean isDefaultFormat()
-