# Interface VersionCatalog

All Superinterfaces:
  `Named`

@NullMarked public interface VersionCatalog extends Named
Provides access to a version catalog. Unlike generated extension classes for catalogs, there is no guarantee that the requested aliases exist, so you must check existence on the returned optional values.

Since:
  7.0

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Optional<Provider<ExternalModuleDependencyBundle>>`
  `findBundle(String alias)`
  Returns the provider for the corresponding bundle alias.
  `Optional<Provider<MinimalExternalModuleDependency>>`
  `findLibrary(String alias)`
  Returns the dependency provider for the corresponding library alias.
  `Optional<Provider<PluginDependency>>`
  `findPlugin(String alias)`
  Returns the plugin dependency provider for the requested alias.
  `Optional<VersionConstraint>`
  `findVersion(String alias)`
  Returns the version constraint with the corresponding alias in the catalog.
  `List<String>`
  `getBundleAliases()`
  Returns the list of bundles defined in this version catalog.
  `List<String>`
  `getLibraryAliases()`
  Returns the list of aliases defined in this version catalog.
  `List<String>`
  `getPluginAliases()`
  Returns the list of plugin aliases defined in this version catalog.
  `List<String>`
  `getVersionAliases()`
  Returns the list of version aliases defined in this version catalog.

  ### Methods inherited from interface Named

  `getName`

- ## Method Details

  - ### findLibrary

    Optional<Provider<MinimalExternalModuleDependency>> findLibrary(String alias)
    Returns the dependency provider for the corresponding library alias.

    Note: Alias will be automatically normalized: '-', '_' and '.' will be replaced with '.'

    Parameters:
      `alias` - the alias of the library
    Since:
      7.4

  - ### findBundle

    Optional<Provider<ExternalModuleDependencyBundle>> findBundle(String alias)
    Returns the provider for the corresponding bundle alias.

    Note: Bundle will be automatically normalized: '-', '_' and '.' will be replaced with '.'

    Parameters:
      `alias` - the alias of the bundle

  - ### findVersion

    Optional<VersionConstraint> findVersion(String alias)
    Returns the version constraint with the corresponding alias in the catalog.

    Note: Alias will be automatically normalized: '-', '_' and '.' will be replaced with '.'

    Parameters:
      `alias` - the alias of the version

  - ### findPlugin

    Optional<Provider<PluginDependency>> findPlugin(String alias)
    Returns the plugin dependency provider for the requested alias.

    Note: Alias will be automatically normalized: '-', '_' and '.' will be replaced with '.'

    Parameters:
      `alias` - the alias of the plugin
    Since:
      7.2

  - ### getLibraryAliases

    List<String> getLibraryAliases()
    Returns the list of aliases defined in this version catalog.

    Note: Returned aliases are normalized: '-', '_' and '.' have been replaced with '.'

    Returns:
      the list of library aliases
    Since:
      7.4

  - ### getBundleAliases

    List<String> getBundleAliases()
    Returns the list of bundles defined in this version catalog.

    Note: Returned aliases are normalized: '-', '_' and '.' have been replaced with '.'

    Returns:
      the list of bundle aliases
    Since:
      7.1

  - ### getVersionAliases

    List<String> getVersionAliases()
    Returns the list of version aliases defined in this version catalog.

    Note: Returned aliases are normalized: '-', '_' and '.' have been replaced with '.'

    Returns:
      the list of version aliases
    Since:
      7.1

  - ### getPluginAliases

    List<String> getPluginAliases()
    Returns the list of plugin aliases defined in this version catalog.

    Note: Returned aliases are normalized: '-', '_' and '.' have been replaced with '.'

    Returns:
      the list of plugin aliases
    Since:
      7.2