registerInstance<T extends Object> method

void registerInstance<T extends Object>(
  1. InstanceCreator<T> instanceCreator
)

Implementation

void registerInstance<T extends Object>(InstanceCreator<T> instanceCreator) {
  if (!appInstances.containsKey(T)) {
    appInstances[T] = instanceCreator();
  }
}