org.gradle.platform.base.binary

## Class BaseBinarySpec

- java.lang.Object
- - org.gradle.api.internal.AbstractBuildableModelElement
  - - org.gradle.platform.base.binary.BaseBinarySpec

- All Implemented Interfaces:
    Buildable, BuildableModelElement, Named, BinarySpec, org.gradle.platform.base.internal.BinarySpecInternal

      @Incubating
      public abstract class BaseBinarySpec
      extends org.gradle.api.internal.AbstractBuildableModelElement
      implements org.gradle.platform.base.internal.BinarySpecInternal

  Base class for custom binary implementations. A custom implementation of `BinarySpec` must extend this type. TODO at the moment leaking BinarySpecInternal here to generate lifecycleTask in LanguageBasePlugin$createLifecycleTaskForBinary#createLifecycleTaskForBinary rule

- - ### Nested Class Summary

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

      `Named.Namer`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends BaseBinarySpec> T` | `create(Class<T> type, org.gradle.platform.base.internal.BinaryNamingScheme namingScheme, org.gradle.internal.reflect.Instantiator instantiator)`
    `String` | `getDisplayName()` Returns a human-consumable display name for this binary.
    `String` | `getName()` The object's name.
    `org.gradle.platform.base.internal.BinaryNamingScheme` | `getNamingScheme()`
    `DomainObjectSet<LanguageSourceSet>` | `getSource()` The source sets used to compile this binary.
    `BinaryTasksCollection` | `getTasks()` The set of tasks associated with this binary.
    `boolean` | `isBuildable()` Can this binary be built in the current environment?
    `boolean` | `isLegacyBinary()`
    `void` | `source(Object source)` Adds one or more `LanguageSourceSet`s that are used to compile this binary.
    `String` | `toString()`

    - ### Methods inherited from class org.gradle.api.internal.AbstractBuildableModelElement

      `builtBy, getBuildDependencies, getBuildTask, hasBuildDependencies, setBuildTask`

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

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

    - ### Methods inherited from interface org.gradle.api.BuildableModelElement

      `builtBy, getBuildTask, hasBuildDependencies, setBuildTask`

    - ### Methods inherited from interface org.gradle.api.Buildable

      `getBuildDependencies`

- - ### Constructor Detail

    - #### BaseBinarySpec

          protected BaseBinarySpec()

  - ### Method Detail

    - #### create

          public static <T extends BaseBinarySpec> T create(Class<T> type,
                                            org.gradle.platform.base.internal.BinaryNamingScheme namingScheme,
                                            org.gradle.internal.reflect.Instantiator instantiator)

    - #### getDisplayName

          public String getDisplayName()

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

    - #### isBuildable

          public boolean isBuildable()

      Description copied from interface: `BinarySpec`
      Can this binary be built in the current environment?
      Specified by:
        `isBuildable` in interface `BinarySpec`

    - #### getSource

          public DomainObjectSet<LanguageSourceSet> getSource()

      Description copied from interface: `BinarySpec`
      The source sets used to compile this binary.
      Specified by:
        `getSource` in interface `BinarySpec`

    - #### source

          public void source(Object source)

      Description copied from interface: `BinarySpec`
      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 `BinarySpec`

    - #### getTasks

          public BinaryTasksCollection getTasks()

      Description copied from interface: `BinarySpec`
      The set of tasks associated with this binary.
      Specified by:
        `getTasks` in interface `BinarySpec`

    - #### 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.

    - #### getNamingScheme

          public org.gradle.platform.base.internal.BinaryNamingScheme getNamingScheme()

      Specified by:
        `getNamingScheme` in interface `org.gradle.platform.base.internal.BinarySpecInternal`

    - #### isLegacyBinary

          public boolean isLegacyBinary()

      Specified by:
        `isLegacyBinary` in interface `org.gradle.platform.base.internal.BinarySpecInternal`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`