if (tname == null && (tname = Types.schemaType(ptype)) == null) {
// must be either an array collection, or a reference
repeat = parm.isCollection();
String usetype = ptype.endsWith(">") ? type : ptype;
BindingMappingDetail detail = m_bindingGenerator.getMappingDetail(usetype);
if (detail == null) {
throw new IllegalStateException("No mapping found for type " + usetype);
} else if (detail.isExtended()) {
elem.setRef(detail.getElementQName());
isref = true;
} else {
MappingElement mapping = detail.getAbstractMapping();
tname = mapping.getTypeQName();
if (tname == null) {
tname = getMappingQName(usetype, mapping);
}
}