removed the unique id from the provided interface. Now using object
[utils] / system / general / src / main / java / org / wamblee / system / core / RequiredInterface.java
index ce8d084cdbaa2b11fcd25c65c7c194a871f64b1a..74c132e02aa7532cde7ec98e982b5be58c82573f 100644 (file)
@@ -20,7 +20,13 @@ public interface RequiredInterface {
        /**
         * Name for the interface. 
         */
-       public String getName(); 
+       String getName();
+       
+       /**
+        * @return True iff the required interface is optional. 
+        */
+       boolean isOptional(); 
+       
        
        /**
         * Checks if the service is provided by a given provided interface. 
@@ -39,13 +45,11 @@ public interface RequiredInterface {
         * Gets the provider interface. 
         * @return Provider or null if not set. 
         */
-       ProvidedInterface getProvider(); 
+       ProvidedInterface getProvider();
        
        /**
-        * Gets the implementation of the required interface. 
-        * @param <T>
-        * @param aClass Interface type. 
-        * @return Interface implementation or null if not known yet. 
+        * Determines if the requirements of the current interface are at least those
+        * of the given required interface. 
         */
-       <T> T getImplementation(Class<T> aClass); 
+       boolean covers(RequiredInterface aInterface); 
 }