List<RuntimeChildDeclaredExtensionDefinition> targetExts = theTargetDef.getExtensions();
for (RuntimeChildDeclaredExtensionDefinition nextExt : targetExts) {
String url = nextExt.getExtensionUrl();
RuntimeChildDeclaredExtensionDefinition sourceDeclaredExt = theSourceDef.getDeclaredExtension(url);
if (sourceDeclaredExt == null) {
for (ExtensionDt next : theSource.getAllUndeclaredExtensions()) {
if (next.getUrlAsString().equals(url)) {
nextExt.getMutator().addValue(theTarget, next.getValue());
}
}
} else {
List<? extends IElement> values = sourceDeclaredExt.getAccessor().getValues(theSource);
for (IElement nextElement : values) {
nextExt.getMutator().addValue(theTarget, nextElement);
}
}