ProvidedInterfaceDescriptor no longer extends InterfaceDescriptor.
[utils] / system / general / src / main / java / org / wamblee / system / Container.java
index a80aa1a21f0c7136b2acd66d8c2b8f9eff6091bf..ee3a053595db2d7a7444d091db19947b0cd4c527 100644 (file)
@@ -42,24 +42,24 @@ public class Container extends AbstractComponent {
         * Also logs a warning in case of superfluous requirements.  
         */
        private void validate() {
-               List<InterfaceDescriptor> provided = new ArrayList<InterfaceDescriptor>();
+               List<ProvidedInterfaceDescriptor> provided = new ArrayList<ProvidedInterfaceDescriptor>();
                for (Component system : _systems) {
                        provided.addAll(Arrays.asList(system.getProvidedServices()));
                }
 
-               List<InterfaceDescriptor> required = new ArrayList<InterfaceDescriptor>();
+               List<RequiredInterfaceDescriptor> required = new ArrayList<RequiredInterfaceDescriptor>();
                for (Component system : _systems) {
                        required.addAll(Arrays.asList(system.getRequiredServices()));
                }
 
-               for (InterfaceDescriptor service : getProvidedServices()) {
+               for (ProvidedInterfaceDescriptor service : getProvidedServices()) {
                        if (!(provided.contains(service))) {
                                throw new SystemAssemblyException(getName() + ": Service '" + service
                                                + "' is not provided by any of the subsystems");
                        }
                }
 
-               for (InterfaceDescriptor service : getRequiredServices()) {
+               for (RequiredInterfaceDescriptor service : getRequiredServices()) {
                        if (!(required.contains(service))) {
                                info("Service '"
                                                + service
@@ -67,16 +67,16 @@ public class Container extends AbstractComponent {
                        }
                }
 
-               List<InterfaceDescriptor> reallyRequired = new ArrayList<InterfaceDescriptor>(
+               List<RequiredInterfaceDescriptor> reallyRequired = new ArrayList<RequiredInterfaceDescriptor>(
                                required);
-               for (InterfaceDescriptor service : provided) {
+               for (ProvidedInterfaceDescriptor service : provided) {
                        reallyRequired.remove(service); 
                }
-               for (InterfaceDescriptor service: getRequiredServices()) { 
+               for (RequiredInterfaceDescriptor service: getRequiredServices()) { 
                        reallyRequired.remove(service); 
                }
                String missingRequired = "";
-               for (InterfaceDescriptor service: reallyRequired) {
+               for (RequiredInterfaceDescriptor service: reallyRequired) {
                        missingRequired += service + "\n";
                }
                if ( missingRequired.length() > 0 ) {