# Interface VariantComponent

All Superinterfaces:
  `ModelElement, Named`

All Known Subinterfaces:
  `ApplicationSpec, CUnitTestSuiteSpec, GeneralComponentSpec, GoogleTestTestSuiteSpec, LibrarySpec, NativeExecutableSpec, NativeLibrarySpec, NativeTestSuiteSpec, PlatformAwareComponentSpec, TargetedNativeComponent, TestSuiteSpec, VariantComponentSpec`

All Known Implementing Classes:
  `BaseComponentSpec`

@Incubating @Deprecated public interface VariantComponent extends ModelElement
Deprecated.
The Gradle software model is deprecated and will be removed in Gradle 10. Use the new component model (e.g. `cpp-application`, `cpp-library`, `swift-application`, `swift-library`, `xctest`) instead.
A component that has one or more mutually exclusive variants.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getName()`
  Deprecated.
  Returns the name of this element.
  `Iterable<? extends Binary>`
  `getVariants()`
  Deprecated.
  The variants of this component.

  ### Methods inherited from interface ModelElement

  `getDisplayName`

- ## Method Details

  - ### getVariants

    Iterable<? extends Binary> getVariants()
    Deprecated.
    The variants of this component.

  - ### getName

    String getName()
    Deprecated.
    Description copied from interface: `ModelElement`
    Returns the name of this element. Each element has a name associated with it, that uniquely identifies the element amongst its siblings. Some element have their name generated or automatically assigned, and for these elements the name may not be human consumable.
    Specified by:
      `getName` in interface `ModelElement`
    Specified by:
      `getName` in interface `Named`
    Returns:
      The name. Never null.