docs: public <T extends Extension> T getExtension(Class<T> clazz) {
          if (clazz != null) {
              Extension extension = extensionsMap.get(clazz);
              if (extension != null) {
                  return clazz.cast(extension);
              }
          }
          return null;
      }