# Klasse OutputFormat

java.lang.Object
org.apache.tools.ant.types.EnumeratedAttribute
org.apache.ant.cyclonedx.OutputFormat

public class OutputFormat extends org.apache.tools.ant.types.EnumeratedAttribute
CycloneDX format to use for the SBOM.

Accepts the enum constants like `JSON` as well as the lowercase version `json` and the special value `all`. The values other than `all` are directly provided by CycloneDX Core's enum.

`all` means the task will emit SBOMs in all formats supported by the selected `SpecVersion` - i.e. only XML for versions 1.1 and 1.2 and both JSON and XML afterwards.

- ## Feldübersicht

  Felder
  Modifikator und Typ
  Feld
  Beschreibung
  `static final OutputFormat`
  `JSON`
  JSON output format.

  ### Von Klasse geerbte Felder org.apache.tools.ant.types.EnumeratedAttribute

  `value`

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `OutputFormat()`

- ## Methodenübersicht

  Modifikator und Typ
  Methode
  Beschreibung
  `Iterable<org.cyclonedx.Format>`
  `getCycloneDxFormats(org.cyclonedx.Version version)`
  Translates this instance to `Format`s.
  `String[]`
  `getValues()`

  ### Von Klasse geerbte Methoden org.apache.tools.ant.types.EnumeratedAttribute

  `containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString`

  ### Von Klasse geerbte Methoden Object

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

- ## Felddetails

  - ### JSON

    public static final OutputFormat JSON
    JSON output format.

- ## Konstruktordetails

  - ### OutputFormat

    public OutputFormat()

- ## Methodendetails

  - ### getValues

    public String[] getValues()
    Angegeben von:
      `getValues` in Klasse `org.apache.tools.ant.types.EnumeratedAttribute`

  - ### getCycloneDxFormats

    public Iterable<org.cyclonedx.Format> getCycloneDxFormats(org.cyclonedx.Version version)
    Translates this instance to `Format`s.
    Parameter:
      `version` - spec version
    Gibt zurück:
      all suported formats of version
    Löst aus:
      `org.apache.tools.ant.BuildException` - if the value can not be translated.