# Klasse ExternalReference

java.lang.Object
org.apache.ant.cyclonedx.ExternalReference

public class ExternalReference extends Object
An "external reference", i.e. a notable link for the component or the SBOM itself.

External references must have a type and an URL. The sepcification also supports optional comments and hashes which are currently not supported.

External references appear as children of `Component` or `ExternalReferenceSet` elements.

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `ExternalReference()`

- ## Methodenübersicht

  Modifikator und Typ
  Methode
  Beschreibung
  `void`
  `setType(String type)`
  Set the type of the external reference.
  `void`
  `setUrl(String url)`
  Set the URL (actually URI) of the external reference.
  `org.cyclonedx.model.ExternalReference`
  `toCycloneDxExternalReference()`
  Maps the instance to a CycloneDX ExternalReference.

  ### Von Klasse geerbte Methoden Object

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

- ## Konstruktordetails

  - ### ExternalReference

    public ExternalReference()

- ## Methodendetails

  - ### setUrl

    public void setUrl(String url)
    Set the URL (actually URI) of the external reference.

    Required. This setter does not validate the value actually follows the URI syntax.

    Parameter:
      `url` - reference's URI

  - ### setType

    public void setType(String type)
    Set the type of the external reference.

    Required.

    Types defined by the specification or the enum names of CycloneDX Core (Java)'s type enum are accepted.

    Parameter:
      `type` - reference's type

  - ### toCycloneDxExternalReference

    public org.cyclonedx.model.ExternalReference toCycloneDxExternalReference()
    Maps the instance to a CycloneDX ExternalReference.
    Gibt zurück:
      CycloneDX version of this instance.