Classes | Private Member Functions | Private Attributes | List of all members
com.google.protobuf.TextFormatParseInfoTree Class Reference

Classes

class  Builder
 

Private Member Functions

 TextFormatParseInfoTree (Map< FieldDescriptor, List< TextFormatParseLocation >> locationsFromField, Map< FieldDescriptor, List< TextFormatParseInfoTree.Builder >> subtreeBuildersFromField)
 

Private Attributes

Map< FieldDescriptor, List< TextFormatParseLocation > > locationsFromField
 
List< TextFormatParseLocationgetLocations (final FieldDescriptor fieldDescriptor)
 
TextFormatParseLocation getLocation (final FieldDescriptor fieldDescriptor, int index)
 
List< TextFormatParseInfoTreegetNestedTrees (final FieldDescriptor fieldDescriptor)
 
TextFormatParseInfoTree getNestedTree (final FieldDescriptor fieldDescriptor, int index)
 
static Builder builder ()
 
static< T > T getFromList (List< T > list, int index, FieldDescriptor fieldDescriptor)
 

Detailed Description

Data structure which is populated with the locations of each field value parsed from the text.

The locations of primary fields values are retrieved by

or

. The locations of sub message values are within nested

s and are retrieve by

or

.

The

is created by a Builder.

Definition at line 50 of file TextFormatParseInfoTree.java.

Constructor & Destructor Documentation

◆ TextFormatParseInfoTree()

com.google.protobuf.TextFormatParseInfoTree.TextFormatParseInfoTree ( Map< FieldDescriptor, List< TextFormatParseLocation >>  locationsFromField,
Map< FieldDescriptor, List< TextFormatParseInfoTree.Builder >>  subtreeBuildersFromField 
)
inlineprivate

Construct a

.

Parameters
locationsFromFielda map of fields to location in the source code
subtreeBuildersFromFielda map of fields to parse tree location information builders

Definition at line 66 of file TextFormatParseInfoTree.java.

Member Function Documentation

◆ builder()

static Builder com.google.protobuf.TextFormatParseInfoTree.builder ( )
inlinestatic

Create a builder for a

ParseInfoTree

.

Returns
the builder

Definition at line 146 of file TextFormatParseInfoTree.java.

◆ getFromList()

static <T> T com.google.protobuf.TextFormatParseInfoTree.getFromList ( List< T list,
int  index,
FieldDescriptor  fieldDescriptor 
)
inlinestaticprivate

Definition at line 150 of file TextFormatParseInfoTree.java.

◆ getLocation()

TextFormatParseLocation com.google.protobuf.TextFormatParseInfoTree.getLocation ( final FieldDescriptor  fieldDescriptor,
int  index 
)
inline

Get the location in the source of a field's value.

Returns the TextFormatParseLocation for index-th value of the field in the parsed text.

Parameters
fieldDescriptorthelink FieldDescriptor} of the desired field
indexthe index of the value.
Returns
the TextFormatParseLocation of the value
Exceptions
IllegalArgumentExceptionindex is out of range

Definition at line 113 of file TextFormatParseInfoTree.java.

◆ getLocations()

List<TextFormatParseLocation> com.google.protobuf.TextFormatParseInfoTree.getLocations ( final FieldDescriptor  fieldDescriptor)
inline

Retrieve all the locations of a field.

Parameters
fieldDescriptorthelink FieldDescriptor} of the desired field
Returns
a list of the locations of values of the field. If there are not values or the field doesn't exist, an empty list is returned.

Definition at line 97 of file TextFormatParseInfoTree.java.

◆ getNestedTree()

TextFormatParseInfoTree com.google.protobuf.TextFormatParseInfoTree.getNestedTree ( final FieldDescriptor  fieldDescriptor,
int  index 
)
inline

Returns the parse info tree for the given field, which must be a message type.

Parameters
fieldDescriptorthelink FieldDescriptor} of the desired sub message
indexthe index of message value.
Returns
the
ParseInfoTree
of the message value.
null
is returned if the field doesn't exist or the index is out of range.
Exceptions
IllegalArgumentExceptionif index is out of range

Definition at line 137 of file TextFormatParseInfoTree.java.

◆ getNestedTrees()

List<TextFormatParseInfoTree> com.google.protobuf.TextFormatParseInfoTree.getNestedTrees ( final FieldDescriptor  fieldDescriptor)
inline

Retrieve a list of all the location information trees for a sub message field.

Parameters
fieldDescriptorthelink FieldDescriptor} of the desired field
Returns
A list of TextFormatParseInfoTree

Definition at line 123 of file TextFormatParseInfoTree.java.

Member Data Documentation

◆ locationsFromField

Map<FieldDescriptor, List<TextFormatParseLocation> > com.google.protobuf.TextFormatParseInfoTree.locationsFromField
private

Definition at line 54 of file TextFormatParseInfoTree.java.


The documentation for this class was generated from the following file:
com.google.protobuf.TextFormatParseInfoTree.getLocation
TextFormatParseLocation getLocation(final FieldDescriptor fieldDescriptor, int index)
Definition: TextFormatParseInfoTree.java:113
com.google.protobuf.TextFormatParseInfoTree.getNestedTrees
List< TextFormatParseInfoTree > getNestedTrees(final FieldDescriptor fieldDescriptor)
Definition: TextFormatParseInfoTree.java:123
com.google.protobuf.TextFormatParseInfoTree.getNestedTree
TextFormatParseInfoTree getNestedTree(final FieldDescriptor fieldDescriptor, int index)
Definition: TextFormatParseInfoTree.java:137
com.google.protobuf.TextFormatParseInfoTree.getLocations
List< TextFormatParseLocation > getLocations(final FieldDescriptor fieldDescriptor)
Definition: TextFormatParseInfoTree.java:97
com.google.protobuf.TextFormatParseInfoTree.TextFormatParseInfoTree
TextFormatParseInfoTree(Map< FieldDescriptor, List< TextFormatParseLocation >> locationsFromField, Map< FieldDescriptor, List< TextFormatParseInfoTree.Builder >> subtreeBuildersFromField)
Definition: TextFormatParseInfoTree.java:66


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08