org.gradle.platform.base.component

## Class BaseComponentSpec

- java.lang.Object
- - org.gradle.platform.base.component.BaseComponentSpec

- All Implemented Interfaces:
    Named, ComponentSpec

      @Incubating
      public abstract class BaseComponentSpec
      extends Object
      implements ComponentSpec

  Base class for custom component implementations. A custom implementation of `ComponentSpec` must extend this type.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseComponentSpec()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends BaseComponentSpec> T` | `create(Class<T> type, ComponentSpecIdentifier identifier, FunctionalSourceSet mainSourceSet, org.gradle.internal.reflect.Instantiator instantiator)`
    `DomainObjectSet<BinarySpec>` | `getBinaries()` The binaries that are built for this component.
    `String` | `getDisplayName()` Returns a human-consumable display name for this component.
    `FunctionalSourceSet` | `getMainSource()`
    `String` | `getName()` The object's name.
    `String` | `getProjectPath()` The path the the project containing this component.
    `DomainObjectSet<LanguageSourceSet>` | `getSource()` The source sets that are used to build this component.
    `void` | `source(Object sources)` Adds one or more `LanguageSourceSet`s that are used to compile this binary.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseComponentSpec

          protected BaseComponentSpec()

  - ### Method Detail

    - #### create

          public static <T extends BaseComponentSpec> T create(Class<T> type,
                                               ComponentSpecIdentifier identifier,
                                               FunctionalSourceSet mainSourceSet,
                                               org.gradle.internal.reflect.Instantiator instantiator)

    - #### getName

          public String getName()

      Description copied from interface: `Named`
      The object's name.

      Must be constant for the life of the object.

      Specified by:
        `getName` in interface `Named`
      Returns:
        The name. Never null.

    - #### getProjectPath

          public String getProjectPath()

      Description copied from interface: `ComponentSpec`
      The path the the project containing this component.
      Specified by:
        `getProjectPath` in interface `ComponentSpec`

    - #### getDisplayName

          public String getDisplayName()

      Description copied from interface: `ComponentSpec`
      Returns a human-consumable display name for this component.
      Specified by:
        `getDisplayName` in interface `ComponentSpec`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getSource

          public DomainObjectSet<LanguageSourceSet> getSource()

      Description copied from interface: `ComponentSpec`
      The source sets that are used to build this component.
      Specified by:
        `getSource` in interface `ComponentSpec`

    - #### source

          public void source(Object sources)

      Description copied from interface: `ComponentSpec`
      Adds one or more `LanguageSourceSet`s that are used to compile this binary.

      This method accepts the following types:
      - A `FunctionalSourceSet`
      - A `LanguageSourceSet`
      - A Collection of `LanguageSourceSet`s
      Specified by:
        `source` in interface `ComponentSpec`

    - #### getBinaries

          public DomainObjectSet<BinarySpec> getBinaries()

      Description copied from interface: `ComponentSpec`
      The binaries that are built for this component. You can use this to configure the binaries for this component.
      Specified by:
        `getBinaries` in interface `ComponentSpec`

    - #### getMainSource

          public FunctionalSourceSet getMainSource()