X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fcore%2FRequiredInterface.java;h=4dd77fc7dad510dcbc062eaab20a402008de627f;hb=1bfc42afcea288a918e8befe65fd8f87b99ba2e4;hp=ce8d084cdbaa2b11fcd25c65c7c194a871f64b1a;hpb=bb66d188e89338f718e7446bb91d8182cd2203fe;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java b/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java index ce8d084c..4dd77fc7 100644 --- a/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java +++ b/system/general/src/main/java/org/wamblee/system/core/RequiredInterface.java @@ -15,12 +15,13 @@ */ package org.wamblee.system.core; -public interface RequiredInterface { - +public interface RequiredInterface extends NamedInterface { + /** - * Name for the interface. + * @return True iff the required interface is optional. */ - public String getName(); + boolean isOptional(); + /** * Checks if the service is provided by a given provided interface. @@ -39,13 +40,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 - * @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 getImplementation(Class aClass); + boolean covers(RequiredInterface aInterface); }