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`

  - ### Field Summary

    - ### Fields inherited from interface org.gradle.platform.base.internal.BinarySpecInternal

      `PUBLIC_MODEL_TYPE`

  - ### 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<? extends BinarySpec> publicType, Class<T> implementationType, String name, org.gradle.internal.reflect.Instantiator instantiator, org.gradle.api.internal.project.taskfactory.ITaskFactory taskFactory)`
    `protected org.gradle.platform.base.internal.BinaryBuildAbility` | `getBinaryBuildAbility()`
    `org.gradle.platform.base.internal.BinaryBuildAbility` | `getBuildAbility()`
    `String` | `getDisplayName()` Returns a human-consumable display name for this binary.
    `org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<LanguageSourceSet>` | `getEntityInstantiator()`
    `DomainObjectSet<LanguageSourceSet>` | `getInputs()` Returns all inputs of the binary.
    `String` | `getName()` The object's name.
    `Class<? extends BinarySpec>` | `getPublicType()`
    `DomainObjectSet<LanguageSourceSet>` | `getSource()` The source sets used to compile this binary.
    `ModelMap<LanguageSourceSet>` | `getSources()` The sources owned by this binary.
    `BinaryTasksCollection` | `getTasks()` The set of tasks associated with this binary.
    `protected String` | `getTypeName()`
    `boolean` | `isBuildable()` Can this binary be built in the current environment?
    `boolean` | `isLegacyBinary()`
    `void` | `setBuildable(boolean buildable)`
    `void` | `sources(Action<? super ModelMap<LanguageSourceSet>> action)` Configures the source sets used to build this binary.
    `void` | `tasks(Action<? super BinaryTasksCollection> action)` Configures the tasks that build 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<? extends BinarySpec> publicType,
                                            Class<T> implementationType,
                                            String name,
                                            org.gradle.internal.reflect.Instantiator instantiator,
                                            org.gradle.api.internal.project.taskfactory.ITaskFactory taskFactory)

    - #### getPublicType

          public Class<? extends BinarySpec> getPublicType()

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

    - #### getTypeName

          protected String getTypeName()

    - #### getDisplayName

          public String getDisplayName()

      Description copied from interface: `BinarySpec`
      Returns a human-consumable display name for this binary.
      Specified by:
        `getDisplayName` 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.

    - #### setBuildable

          public void setBuildable(boolean buildable)

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

    - #### isBuildable

          public final 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`

    - #### sources

          public void sources(Action<? super ModelMap<LanguageSourceSet>> action)

      Description copied from interface: `BinarySpec`
      Configures the source sets used to build this binary.
      Specified by:
        `sources` in interface `BinarySpec`
      Parameters:
        `action` - The configuration action to execute for each owned source set.

    - #### getEntityInstantiator

          public org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<LanguageSourceSet> getEntityInstantiator()

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

    - #### getInputs

          public DomainObjectSet<LanguageSourceSet> getInputs()

      Description copied from interface: `BinarySpec`
      Returns all inputs of the binary. This includes source sets owned by the binary, and other source sets created elsewhere (e.g. inherited from the binary's component).
      Specified by:
        `getInputs` in interface `BinarySpec`
      Returns:
        all inputs of the binary.

    - #### getSources

          public ModelMap<LanguageSourceSet> getSources()

      Description copied from interface: `BinarySpec`
      The sources owned by this binary.
      Specified by:
        `getSources` in interface `BinarySpec`
      Returns:
        the sources owned by the binary.

    - #### getTasks

          public BinaryTasksCollection getTasks()

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

    - #### tasks

          public void tasks(Action<? super BinaryTasksCollection> action)

      Description copied from interface: `BinarySpec`
      Configures the tasks that build this binary.
      Specified by:
        `tasks` in interface `BinarySpec`

    - #### isLegacyBinary

          public boolean isLegacyBinary()

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getBuildAbility

          public final org.gradle.platform.base.internal.BinaryBuildAbility getBuildAbility()

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

    - #### getBinaryBuildAbility

          protected org.gradle.platform.base.internal.BinaryBuildAbility getBinaryBuildAbility()