Classes | |
class | InvalidEscapeSequenceException |
class | ParseException |
class | Parser |
class | Printer |
class | TextGenerator |
class | Tokenizer |
class | UnknownFieldParseException |
Static Public Member Functions | |
static String | escapeBytes (byte[] input) |
static String | escapeBytes (byte[] input) |
static String | escapeBytes (ByteString input) |
static String | escapeBytes (ByteString input) |
static String | escapeDoubleQuotesAndBackslashes (final String input) |
static String | escapeDoubleQuotesAndBackslashes (final String input) |
static Parser | getParser () |
static Parser | getParser () |
static void | merge (final CharSequence input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws ParseException |
static void | merge (final CharSequence input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws ParseException |
static void | merge (final CharSequence input, final Message.Builder builder) throws ParseException |
static void | merge (final CharSequence input, final Message.Builder builder) throws ParseException |
static void | merge (final Readable input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws IOException |
static void | merge (final Readable input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws IOException |
static void | merge (final Readable input, final Message.Builder builder) throws IOException |
static void | merge (final Readable input, final Message.Builder builder) throws IOException |
static< T extends Message > T | parse (final CharSequence input, final Class< T > protoClass) throws ParseException |
static< T extends Message > T | parse (final CharSequence input, final Class< T > protoClass) throws ParseException |
static< T extends Message > T | parse (final CharSequence input, final ExtensionRegistry extensionRegistry, final Class< T > protoClass) throws ParseException |
static< T extends Message > T | parse (final CharSequence input, final ExtensionRegistry extensionRegistry, final Class< T > protoClass) throws ParseException |
static void | print (final MessageOrBuilder message, final Appendable output) throws IOException |
static void | print (final MessageOrBuilder message, final Appendable output) throws IOException |
static void | print (final UnknownFieldSet fields, final Appendable output) throws IOException |
static void | print (final UnknownFieldSet fields, final Appendable output) throws IOException |
static Printer | printer () |
static Printer | printer () |
static void | printField (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
static void | printField (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
static String | printFieldToString (final FieldDescriptor field, final Object value) |
static String | printFieldToString (final FieldDescriptor field, final Object value) |
static void | printFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
static void | printFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
static String | printToString (final MessageOrBuilder message) |
static String | printToString (final MessageOrBuilder message) |
static String | printToString (final UnknownFieldSet fields) |
static String | printToString (final UnknownFieldSet fields) |
static String | printToUnicodeString (final MessageOrBuilder message) |
static String | printToUnicodeString (final MessageOrBuilder message) |
static String | printToUnicodeString (final UnknownFieldSet fields) |
static String | printToUnicodeString (final UnknownFieldSet fields) |
static void | printUnicode (final MessageOrBuilder message, final Appendable output) throws IOException |
static void | printUnicode (final MessageOrBuilder message, final Appendable output) throws IOException |
static void | printUnicode (final UnknownFieldSet fields, final Appendable output) throws IOException |
static void | printUnicode (final UnknownFieldSet fields, final Appendable output) throws IOException |
static void | printUnicodeFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
static void | printUnicodeFieldValue (final FieldDescriptor field, final Object value, final Appendable output) throws IOException |
static void | printUnknownFieldValue (final int tag, final Object value, final Appendable output) throws IOException |
static void | printUnknownFieldValue (final int tag, final Object value, final Appendable output) throws IOException |
static String | shortDebugString (final FieldDescriptor field, final Object value) |
static String | shortDebugString (final FieldDescriptor field, final Object value) |
static String | shortDebugString (final MessageOrBuilder message) |
static String | shortDebugString (final MessageOrBuilder message) |
static String | shortDebugString (final UnknownFieldSet fields) |
static String | shortDebugString (final UnknownFieldSet fields) |
static ByteString | unescapeBytes (final CharSequence charString) throws InvalidEscapeSequenceException |
static ByteString | unescapeBytes (final CharSequence charString) throws InvalidEscapeSequenceException |
static String | unsignedToString (final int value) |
static String | unsignedToString (final int value) |
static String | unsignedToString (final long value) |
static String | unsignedToString (final long value) |
Private Member Functions | |
TextFormat () | |
TextFormat () | |
Static Private Member Functions | |
static int | digitValue (final byte c) |
static int | digitValue (final byte c) |
static boolean | isHex (final byte c) |
static boolean | isHex (final byte c) |
static boolean | isOctal (final byte c) |
static boolean | isOctal (final byte c) |
static TextGenerator | multiLineOutput (Appendable output) |
static TextGenerator | multiLineOutput (Appendable output) |
static long | parseInteger (final String text, final boolean isSigned, final boolean isLong) throws NumberFormatException |
static long | parseInteger (final String text, final boolean isSigned, final boolean isLong) throws NumberFormatException |
static void | printUnknownFieldValue (final int tag, final Object value, final TextGenerator generator) throws IOException |
static void | printUnknownFieldValue (final int tag, final Object value, final TextGenerator generator) throws IOException |
static TextGenerator | singleLineOutput (Appendable output) |
static TextGenerator | singleLineOutput (Appendable output) |
Static Private Attributes | |
static final Logger | logger = Logger.getLogger(TextFormat.class.getName()) |
static final Parser | PARSER = Parser.newBuilder().build() |
Provide text parsing and formatting support for proto2 instances. The implementation largely follows google/protobuf/text_format.cc.
Definition at line 55 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlineprivate |
Definition at line 56 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlineprivate |
Definition at line 60 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Interpret a character as a digit (in any base up to 36) and return the numeric value. This is like
but we don't accept non-ASCII digits.
Definition at line 2358 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Interpret a character as a digit (in any base up to 36) and return the numeric value. This is like
but we don't accept non-ASCII digits.
Definition at line 2516 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Like escapeBytes(ByteString), but used for byte array.
Definition at line 2201 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Like escapeBytes(ByteString), but used for byte array.
Definition at line 2289 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Escapes bytes in the format used in protocol buffer text format, which is the same as the format used for C string literals. All bytes that are not printable 7-bit ASCII characters are escaped, as well as backslash, single-quote, and double-quote characters. Characters for which no defined short-hand escape sequence is defined will be escaped using 3-digit octal sequences.
Definition at line 2196 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Escapes bytes in the format used in protocol buffer text format, which is the same as the format used for C string literals. All bytes that are not printable 7-bit ASCII characters are escaped, as well as backslash, single-quote, and double-quote characters. Characters for which no defined short-hand escape sequence is defined will be escaped using 3-digit octal sequences.
Definition at line 2284 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Escape double quotes and backslashes in a String for emittingUnicode output of a message.
Definition at line 2332 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Escape double quotes and backslashes in a String for emittingUnicode output of a message.
Definition at line 2490 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Return a Parser instance which can parse text-format messages. The returned instance is thread-safe.
Definition at line 1358 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Return a Parser instance which can parse text-format messages. The returned instance is thread-safe.
Definition at line 1443 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Is this a hex digit?
Definition at line 2350 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Is this a hex digit?
Definition at line 2508 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Is this an octal digit?
Definition at line 2345 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Is this an octal digit?
Definition at line 2503 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
. Extensions will be recognized if they are registered in
.
Definition at line 1404 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
. Extensions will be recognized if they are registered in
.
Definition at line 1489 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
.
Definition at line 1368 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
.
Definition at line 1453 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
. Extensions will be recognized if they are registered in
.
Definition at line 1391 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
. Extensions will be recognized if they are registered in
.
Definition at line 1476 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
.
Definition at line 1363 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
and merge the contents into
.
Definition at line 1448 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 723 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 808 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
.
Definition at line 1378 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
.
Definition at line 1463 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
. Extensions will be recognized if they are registered in
.
Definition at line 1418 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Parse a text-format message from
. Extensions will be recognized if they are registered in
.
Definition at line 1503 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 2406 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 2564 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of the Protocol Message supplied into the parameter output. (This representation is the new version of the classic "ProtocolPrinter" output from the original Protocol Buffer system)
Definition at line 68 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of the Protocol Message supplied into the parameter output. (This representation is the new version of the classic "ProtocolPrinter" output from the original Protocol Buffer system)
Definition at line 73 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of
to
.
Definition at line 79 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of
to
.
Definition at line 84 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Printer instance which escapes non-ASCII characters.
Definition at line 282 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Printer instance which escapes non-ASCII characters.
Definition at line 287 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Definition at line 181 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Definition at line 186 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Definition at line 189 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Definition at line 194 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of the value of given field value.
field | the descriptor of the field |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 225 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of the value of given field value.
field | the descriptor of the field |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 230 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Like
, but writes directly to a
and returns it.
Definition at line 143 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Like
, but writes directly to a
and returns it.
Definition at line 148 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Like
, but writes directly to a
and returns it.
Definition at line 153 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Like
, but writes directly to a
and returns it.
Definition at line 158 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters in string type fields are not escaped in backslash+octals.
Definition at line 164 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters in string type fields are not escaped in backslash+octals.
Definition at line 169 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters in string type fields are not escaped in backslash+octals.
Definition at line 175 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters in string type fields are not escaped in backslash+octals.
Definition at line 180 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters are not escaped.
Definition at line 90 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters are not escaped.
Definition at line 95 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters are not escaped.
Definition at line 101 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Same as
, except that non-ASCII characters are not escaped.
Definition at line 106 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a unicode textual representation of the value of given field value.
Same as
, except that non-ASCII characters in string type fields are not escaped in backslash+octals.
field | the descriptor of the field |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 208 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a unicode textual representation of the value of given field value.
Same as
, except that non-ASCII characters in string type fields are not escaped in backslash+octals.
field | the descriptor of the field |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 213 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of the value of an unknown field.
tag | the field's tag number |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 239 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Outputs a textual representation of the value of an unknown field.
tag | the field's tag number |
value | the value of the field |
output | the output to which to append the formatted value |
ClassCastException | if the value is not appropriate for the given field descriptor |
IOException | if there is an exception writing to the output |
Definition at line 244 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 244 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 249 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Generates a human readable form of the field, useful for debugging and other purposes, with no newline characters.
Definition at line 122 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Generates a human readable form of the field, useful for debugging and other purposes, with no newline characters.
Definition at line 127 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Generates a human readable form of this message, useful for debugging and other purposes, with no newline characters. This is just a trivial wrapper around TextFormat.Printer#shortDebugString(MessageOrBuilder).
Definition at line 111 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Generates a human readable form of this message, useful for debugging and other purposes, with no newline characters. This is just a trivial wrapper around TextFormat.Printer#shortDebugString(MessageOrBuilder).
Definition at line 116 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Generates a human readable form of the unknown fields, useful for debugging and other purposes, with no newline characters.
Definition at line 133 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Generates a human readable form of the unknown fields, useful for debugging and other purposes, with no newline characters.
Definition at line 138 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 727 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestaticprivate |
Definition at line 812 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Un-escape a byte sequence as escaped using escapeBytes(ByteString). Two-digit hex escapes (starting with "\x") are also recognized.
Definition at line 2209 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Un-escape a byte sequence as escaped using escapeBytes(ByteString). Two-digit hex escapes (starting with "\x") are also recognized.
Definition at line 2297 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Convert an unsigned 32-bit integer to a string.
Definition at line 704 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Convert an unsigned 32-bit integer to a string.
Definition at line 789 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Convert an unsigned 64-bit integer to a string.
Definition at line 713 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
inlinestatic |
Convert an unsigned 64-bit integer to a string.
Definition at line 798 of file protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
staticprivate |
Definition at line 58 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.
|
staticprivate |
Definition at line 1352 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/TextFormat.java.