Package | Description |
---|---|
com.google.protobuf |
Modifier and Type | Class and Description |
---|---|
static class |
TextFormat.UnknownFieldParseException
Thrown when encountering an unknown field while parsing
a text format message.
|
Modifier and Type | Method and Description |
---|---|
private TextFormat.ParseException |
TextFormat.Tokenizer.floatParseException(java.lang.NumberFormatException e)
Constructs an appropriate
TextFormat.ParseException for the given
NumberFormatException when trying to parse a float or double. |
private TextFormat.ParseException |
TextFormat.Tokenizer.integerParseException(java.lang.NumberFormatException e)
Constructs an appropriate
TextFormat.ParseException for the given
NumberFormatException when trying to parse an integer. |
TextFormat.ParseException |
TextFormat.Tokenizer.parseException(java.lang.String description)
Returns a
TextFormat.ParseException with the current line and column
numbers in the description, suitable for throwing. |
TextFormat.ParseException |
TextFormat.Tokenizer.parseExceptionPreviousToken(java.lang.String description)
Returns a
TextFormat.ParseException with the line and column numbers of
the previous token in the description, suitable for throwing. |
Modifier and Type | Method and Description |
---|---|
private void |
TextFormat.Parser.checkUnknownFields(java.util.List<java.lang.String> unknownFields) |
void |
TextFormat.Tokenizer.consume(java.lang.String token)
If the next token exactly matches
token , consume it. |
boolean |
TextFormat.Tokenizer.consumeBoolean()
If the next token is a boolean, consume it and return its value.
|
ByteString |
TextFormat.Tokenizer.consumeByteString()
If the next token is a string, consume it, unescape it as a
ByteString , and return it. |
private void |
TextFormat.Tokenizer.consumeByteString(java.util.List<ByteString> list)
Like
TextFormat.Tokenizer.consumeByteString() but adds each token of the string to
the given list. |
double |
TextFormat.Tokenizer.consumeDouble()
If the next token is a double, consume it and return its value.
|
private void |
TextFormat.Parser.consumeFieldValue(TextFormat.Tokenizer tokenizer,
ExtensionRegistry extensionRegistry,
MessageReflection.MergeTarget target,
Descriptors.FieldDescriptor field,
ExtensionRegistry.ExtensionInfo extension,
TextFormatParseInfoTree.Builder parseTreeBuilder,
java.util.List<java.lang.String> unknownFields)
Parse a single field value from
tokenizer and merge it into
builder . |
private void |
TextFormat.Parser.consumeFieldValues(TextFormat.Tokenizer tokenizer,
ExtensionRegistry extensionRegistry,
MessageReflection.MergeTarget target,
Descriptors.FieldDescriptor field,
ExtensionRegistry.ExtensionInfo extension,
TextFormatParseInfoTree.Builder parseTreeBuilder,
java.util.List<java.lang.String> unknownFields)
Parse a one or more field values from
tokenizer and merge it into
builder . |
float |
TextFormat.Tokenizer.consumeFloat()
If the next token is a float, consume it and return its value.
|
java.lang.String |
TextFormat.Tokenizer.consumeIdentifier()
If the next token is an identifier, consume it and return its value.
|
int |
TextFormat.Tokenizer.consumeInt32()
If the next token is a 32-bit signed integer, consume it and return its
value.
|
long |
TextFormat.Tokenizer.consumeInt64()
If the next token is a 64-bit signed integer, consume it and return its
value.
|
java.lang.String |
TextFormat.Tokenizer.consumeString()
If the next token is a string, consume it and return its (unescaped)
value.
|
int |
TextFormat.Tokenizer.consumeUInt32()
If the next token is a 32-bit unsigned integer, consume it and return its
value.
|
long |
TextFormat.Tokenizer.consumeUInt64()
If the next token is a 64-bit unsigned integer, consume it and return its
value.
|
static void |
TextFormat.merge(java.lang.CharSequence input,
ExtensionRegistry extensionRegistry,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
void |
TextFormat.Parser.merge(java.lang.CharSequence input,
ExtensionRegistry extensionRegistry,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
static void |
TextFormat.merge(java.lang.CharSequence input,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
void |
TextFormat.Parser.merge(java.lang.CharSequence input,
Message.Builder builder)
Parse a text-format message from
input and merge the contents
into builder . |
private void |
TextFormat.Parser.mergeField(TextFormat.Tokenizer tokenizer,
ExtensionRegistry extensionRegistry,
MessageReflection.MergeTarget target,
java.util.List<java.lang.String> unknownFields)
Parse a single field from
tokenizer and merge it into
builder . |
private void |
TextFormat.Parser.mergeField(TextFormat.Tokenizer tokenizer,
ExtensionRegistry extensionRegistry,
MessageReflection.MergeTarget target,
TextFormatParseInfoTree.Builder parseTreeBuilder,
java.util.List<java.lang.String> unknownFields)
Parse a single field from
tokenizer and merge it into
target . |
static <T extends Message> |
TextFormat.parse(java.lang.CharSequence input,
java.lang.Class<T> protoClass)
Parse a text-format message from
input . |
static <T extends Message> |
TextFormat.parse(java.lang.CharSequence input,
ExtensionRegistry extensionRegistry,
java.lang.Class<T> protoClass)
Parse a text-format message from
input . |
private void |
TextFormat.Parser.skipField(TextFormat.Tokenizer tokenizer)
Skips the next field including the field's name and value.
|
private void |
TextFormat.Parser.skipFieldMessage(TextFormat.Tokenizer tokenizer)
Skips the whole body of a message including the beginning delimiter and
the ending delimiter.
|
private void |
TextFormat.Parser.skipFieldValue(TextFormat.Tokenizer tokenizer)
Skips a field value.
|