1 package org.wamblee.system;
3 public interface RequiredInterface {
6 * Name for the interface.
8 public String getName();
11 * Checks if the service is provided by a given provided interface.
12 * @param aInterface Provided interface.
15 boolean implementedBy(ProvidedInterface aInterface);
18 * Sets the provider of this interface.
19 * @param aProvider Provider.
21 void setProvider(ProvidedInterface aProvider);
24 * Getst the provider interface.
25 * @return Provider or null if not set.
27 ProvidedInterface getProvider();
30 * Gets the implementation of the required interface.
32 * @param aClass Interface type.
33 * @return Interface implementation or null if not known yet.
35 <T> T getImplementation(Class<T> aClass);