Iterator<ExtendedReferenceTypeDefinition> ertdl = sd.getExtendedReferenceTypeDefList();
if (ertdl != null){
while(ertdl.hasNext()){
ExtendedReferenceTypeDefinition ertd = ertdl.next();
DmcTypeClassDefinitionREFSV attr = (DmcTypeClassDefinitionREFSV) ertd.getDMO().get(MetaDMSAG.__extendedReferenceClass);
if (attr == null){
ResultException ex = new ResultException();
ex.addError("Missing extendedReferenceClass for ExtendedReferenceTypeDefinition: " + ertd.getName());
ex.result.lastResult().fileName(ertd.getFile());
ex.result.lastResult().lineNumber(ertd.getLineNumber());
throw(ex);
}
try {
attr.resolveReferences(this);
} catch (DmcValueException e) {
ResultException ex = new ResultException();
ex.addError("Unknown class referred to by extendedReferenceClass: " + attr.getSV().getObjectName().getNameString());
ex.result.lastResult().fileName(ertd.getFile());
ex.result.lastResult().lineNumber(ertd.getLineNumber());
throw(ex);
}