Added an API method in FieldData to allow access to the UnknownField data

Change-Id: I2cd5cfc80dce2a297fcd2511074b2a9d23d39837
This commit is contained in:
Behrooz Khorashadi 2014-10-29 16:40:09 -07:00
parent 59f2ff5856
commit 5d6fc1921d

View File

@ -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.