@SuppressWarnings("unchecked")
  @Override
  public <T> T create(final Class<T> cls) throws Exception {
    if (CommandLine.IVersionProvider.class.isAssignableFrom(cls)) {
      return (T) new VersionProvider(pluginVersionsProvider);
    }

    return defaultFactory.create(cls);
  }
BesuCommandCustomFactory Constructor

@param pluginVersionsProvider instance of PluginVersionsProvider
app/src/main/java/org/hyperledger/besu/cli/util/BesuCommandCustomFactory.java