}
private void mergeFromComponentType(OSGiImplementation impl, ComponentType componentType, ModelResolver resolver) {
List<Service> services = componentType.getServices();
for (Service service : services) {
Interface interfaze = service.getInterfaceContract().getInterface();
if (interfaze instanceof JavaInterface) {
JavaInterface javaInterface = (JavaInterface)interfaze;
if (javaInterface.getJavaClass() == null) {
javaInterface.setJavaClass(getJavaClass(resolver, javaInterface.getName()));
}
if (service.getInterfaceContract().getCallbackInterface() instanceof JavaInterface) {
JavaInterface callbackInterface =
(JavaInterface)service.getInterfaceContract().getCallbackInterface();
if (callbackInterface.getJavaClass() == null) {
callbackInterface.setJavaClass(getJavaClass(resolver, callbackInterface.getName()));
}
}
impl.getServices().add(service);
}
}
List<Reference> references = componentType.getReferences();
for (Reference reference : references) {
Interface interfaze = reference.getInterfaceContract().getInterface();
if (interfaze instanceof JavaInterface) {
JavaInterface javaInterface = (JavaInterface)interfaze;
if (javaInterface.getJavaClass() == null) {
javaInterface.setJavaClass(getJavaClass(resolver, javaInterface.getName()));
}