# Klasse ComponentBomTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.ant.cyclonedx.ComponentBomTask

Alle implementierten Schnittstellen:
  `Cloneable`

public class ComponentBomTask extends org.apache.tools.ant.Task
Task that creates CycloneDX BOMs for a single component.

- ## Feldübersicht

  ### Von Klasse geerbte Felder org.apache.tools.ant.Task

  `target, taskName, taskType, wrapper`

  ### Von Klasse geerbte Felder org.apache.tools.ant.ProjectComponent

  `description, location, project`

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `ComponentBomTask()`

- ## Methodenübersicht

  Modifikator und Typ
  Methode
  Beschreibung
  `void`
  `addAdditionalComponent(Component c)`
  Adds another component to the SBOM.
  `void`
  `addConfiguredLicense(License l)`
  Adds a license to the SBOM's metadata.
  `void`
  `addToolComponent(Component c)`
  Adds component to be added to the metadata.tools section of the SBOM.
  `Component`
  `createComponent()`
  Sets the component for the SBOM.
  `Organization`
  `createManufacturer()`
  Sets the manufacturer of the SBOM.
  `org.apache.tools.ant.types.resources.Union`
  `createPureFileComponents()`
  Accepts arbitrary file-system only resources that will be added as components of type file.
  `Organization`
  `createSupplier()`
  Sets the supplier of the SBOM.
  `void`
  `execute()`
  `void`
  `setBomName(String bomName)`
  Sets the base name of the generated BOM.
  `void`
  `setFormat(OutputFormat format)`
  Which serialization format of CycloneDX SBOM to use.
  `void`
  `setOutputDirectory(File f)`
  Sets the output directory for the generated SBOM.
  `void`
  `setSpecVersion(SpecVersion specVersion)`
  Specifies the CycloneDX version to use.
  `void`
  `setUseComponentManufacturer(boolean useComponentManufacturer)`
  Whether to use the manufacturer of the main component as manufacturer for the BOM as well.
  `void`
  `setUseComponentSupplier(boolean useComponentSupplier)`
  Whether to use the supplier of the main component as supplier for the BOM as well.

  ### Von Klasse geerbte Methoden org.apache.tools.ant.Task

  `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

  ### Von Klasse geerbte Methoden org.apache.tools.ant.ProjectComponent

  `clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

  ### Von Klasse geerbte Methoden Object

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

- ## Konstruktordetails

  - ### ComponentBomTask

    public ComponentBomTask()

- ## Methodendetails

  - ### setSpecVersion

    public void setSpecVersion(SpecVersion specVersion)
    Specifies the CycloneDX version to use.

    Defaults to 1.6.

    Parameter:
      `specVersion` - specification version

  - ### setFormat

    public void setFormat(OutputFormat format)
    Which serialization format of CycloneDX SBOM to use.
    Parameter:
      `format` - output format

  - ### setBomName

    public void setBomName(String bomName)
    Sets the base name of the generated BOM.

    The file name will be the base name plus the extension of the .

    Parameter:
      `bomName` - base name of generated file

  - ### setOutputDirectory

    public void setOutputDirectory(File f)
    Sets the output directory for the generated SBOM.
    Parameter:
      `f` - output directory

  - ### setUseComponentSupplier

    public void setUseComponentSupplier(boolean useComponentSupplier)
    Whether to use the supplier of the main component as supplier for the BOM as well.
    Parameter:
      `useComponentSupplier` - whether to use supplier of component for the BOM

  - ### setUseComponentManufacturer

    public void setUseComponentManufacturer(boolean useComponentManufacturer)
    Whether to use the manufacturer of the main component as manufacturer for the BOM as well.
    Parameter:
      `useComponentManufacturer` - whether to use manufacturer of component for the BOM

  - ### createComponent

    public Component createComponent()
    Sets the component for the SBOM.
    Gibt zurück:
      container for main component

  - ### createManufacturer

    public Organization createManufacturer()
    Sets the manufacturer of the SBOM.

    At most one manufacturer can be set.

    Gibt zurück:
      manufaturer of SBOM

  - ### createSupplier

    public Organization createSupplier()
    Sets the supplier of the SBOM.

    At most one supplier can be set.

    Gibt zurück:
      supplier of SBOM

  - ### addConfiguredLicense

    public void addConfiguredLicense(License l)
    Adds a license to the SBOM's metadata.
    Parameter:
      `l` - SBOM's license

  - ### addAdditionalComponent

    public void addAdditionalComponent(Component c)
    Adds another component to the SBOM.
    Parameter:
      `c` - component to be added to SBOM

  - ### addToolComponent

    public void addToolComponent(Component c)
    Adds component to be added to the metadata.tools section of the SBOM.

    This is meant to be used by tools that have also taken part in the generation of this SBOM.

    Parameter:
      `c` - component to be added to tools

  - ### createPureFileComponents

    public org.apache.tools.ant.types.resources.Union createPureFileComponents()
    Accepts arbitrary file-system only resources that will be added as components of type file.
    Gibt zurück:
      container for pure file components

  - ### execute

    public void execute()
    Setzt außer Kraft:
      `execute` in Klasse `org.apache.tools.ant.Task`