code: public void addComponent (BaseComponent comp)
      {
          if (comp instanceof InitComponent) {
              if (_initers == null) {
                  throw new IllegalStateException("Too late to register InitComponent.");
              }
              _initers.add((InitComponent)comp);
          }
          if (comp instanceof ShutdownComponent) {
              if (_downers == null) {
                  throw new IllegalStateException("Too late to register ShutdownComponent.");
              }
              _downers.add((ShutdownComponent)comp);
          }
      }
docs: Registers a component with the lifecycle. This should be done during dependency resolution
  by injecting the Lifecycle into your constructor and calling this method there.