Object resolved = map.get(unresolved);
if (resolved != null) {
if (unresolved instanceof OSGiImplementationImpl && !(resolved instanceof OSGiImplementationImpl)) {
OSGiImplementationImpl impl = ((OSGiImplementationImpl)unresolved);
ComponentType componentType = (ComponentType)resolved;
List<Property> properties = componentType.getProperties();
for (Property property : properties) {
impl.getProperties().add(property);
}
impl.setUnresolved(false);
return unresolved;
}
// Return the resolved object
return modelClass.cast(resolved);