예제 #1
0
 /**
  * This method is like register, but is willing to swap out an existing instance. We are not
  * protected from clients that have looked up the previous service and are making calls on it, so
  * this is a bit of a hack. Currently it is required for the unit tests to work properly, but
  * should be phased out when possible.
  */
 public static <S, C extends S> void replace(Class<S> interfaceClazz, C concreteImpl) {
   innerPut(interfaceClazz, concreteImpl, true);
 }
예제 #2
0
 public static <S, C extends S> void register(Class<S> interfaceClazz, C concreteImpl) {
   innerPut(interfaceClazz, concreteImpl, false);
 }