}
ObjectData objectData = new ObjectData(this, input, fieldArraySize, volatileFields.size(),
superObjectData);
if (requiresJsonObject && jsonProperties == null) {
throw new JsonProtocolParseException("JSON object input expected");
}
for (FieldLoader fieldLoader : fieldLoaders) {
String fieldName = fieldLoader.getFieldName();
Object value = jsonProperties.get(fieldName);
boolean hasValue;
if (value == null) {
hasValue = jsonProperties.containsKey(fieldName);
} else {
hasValue = true;
}
fieldLoader.parse(hasValue, value, objectData);
}
if (closedNameSet != null) {
for (Object fieldNameObject : jsonProperties.keySet()) {
if (!closedNameSet.contains(fieldNameObject)) {
throw new JsonProtocolParseException("Unexpected field " + fieldNameObject);
}
}
}
parseObjectSubtype(objectData, jsonProperties, input);
if (checkLazyParsedFields) {
eagerFieldParser.parseAllFields(objectData);
}
wrapInProxy(objectData, methodHandlerMap);
return objectData;
} catch (JsonProtocolParseException e) {
throw new JsonProtocolParseException("Failed to parse type " + getTypeClass().getName(), e);
}
}