code: public ExtensionItemInfoImpl getOrRegisterExtension(final Class<?> extension, final boolean fromScan) {
          final ExtensionItemInfoImpl info;
          if (fromScan) {
              setScope(ConfigScope.ClasspathScan.getType());
              info = register(ConfigItem.Extension, extension);
              closeScope();
          } else {
              // info will be available for sure because such type was stored before (during manual registration)
              info = getInfo(extension);
          }
  
          return info;
      }
docs: Extensions classpath scan requires testing with all installers to recognize actual extensions.
  To avoid duplicate installers recognition, extensions resolved by classpath scan are registered
  immediately. It's required because of not obvious method used for both manually registered extensions
  (to obtain container) and to create container from extensions from classpath scan.
  
  @param extension found extension
  @param fromScan  true when called for extension found in classpath scan, false for manually
  registered extension
  @return extension info container