Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
5d6fc192
Commit
5d6fc192
authored
Oct 29, 2014
by
Behrooz Khorashadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an API method in FieldData to allow access to the UnknownField data
Change-Id: I2cd5cfc80dce2a297fcd2511074b2a9d23d39837
parent
59f2ff58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
FieldData.java
java/src/main/java/com/google/protobuf/nano/FieldData.java
+17
-0
No files found.
java/src/main/java/com/google/protobuf/nano/FieldData.java
View file @
5d6fc192
...
...
@@ -58,6 +58,23 @@ class FieldData {
unknownFieldData
.
add
(
unknownField
);
}
UnknownFieldData
getUnknownField
(
int
index
)
{
if
(
unknownFieldData
==
null
)
{
return
null
;
}
if
(
index
<
unknownFieldData
.
size
())
{
return
unknownFieldData
.
get
(
index
);
}
return
null
;
}
int
getUnknownFieldSize
()
{
if
(
unknownFieldData
==
null
)
{
return
0
;
}
return
unknownFieldData
.
size
();
}
<
T
>
T
getValue
(
Extension
<?,
T
>
extension
)
{
if
(
value
!=
null
){
if
(
cachedExtension
!=
extension
)
{
// Extension objects are singletons.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment