/**
* 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.
* @return Provider or null if not set.
*/
ProvidedInterface getProvider();
-
- /**
- * Gets the implementation of the required interface.
- * @param <T>
- * @param aClass Interface type.
- * @return Interface implementation or null if not known yet.
- */
- <T> T getImplementation(Class<T> aClass);
}