// Look at the type attribute specified. If this fails,
// use the javaType of the property to get the type qname.
QName qn = context.getTypeFromAttributes(namespace, localName, attributes);
// get the deserializer
Deserializer dSer = context.getDeserializerForType(qn);
// If no deserializer, use the base DeserializerImpl.
// There may not be enough information yet to choose the
// specific deserializer.
if (dSer == null) {
dSer = new DeserializerImpl();
// determine a default type for this child element
TypeMapping tm = context.getTypeMapping();
Class type = propDesc.getType();
dSer.setDefaultType(tm.getTypeQName(type));
}
if (propDesc.isWriteable()) {
if (!propDesc.isIndexed()) {
// Success! Register the target and deserializer.
collectionIndex = -1;
dSer.registerValueTarget(
new BeanPropertyTarget(value, propDesc));
} else {
// Success! This is a collection of properties so use the index
collectionIndex++;
dSer.registerValueTarget(
new BeanPropertyTarget(value,
propDesc,
collectionIndex));
}
}