Class SpecVersion


  • public class SpecVersion
    extends org.apache.tools.ant.types.EnumeratedAttribute
    CycloneDX specification version to use for the SBOM.

    Accepts the enum constants like VERSION_17 as well as the human readable version 1.7. The values are directly provided by CycloneDX Core's enum.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static SpecVersion DEFAULT
      Default spec version.
      • Fields inherited from class org.apache.tools.ant.types.EnumeratedAttribute

        value
    • Constructor Summary

      Constructors 
      Constructor Description
      SpecVersion()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      java.lang.String[] getValues()  
      org.cyclonedx.Version getVersion()
      Translates this instance to a Version.
      int hashCode()  
      • Methods inherited from class org.apache.tools.ant.types.EnumeratedAttribute

        containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT

        public static final SpecVersion DEFAULT
        Default spec version.
    • Constructor Detail

      • SpecVersion

        public SpecVersion()
    • Method Detail

      • getValues

        public java.lang.String[] getValues()
        Specified by:
        getValues in class org.apache.tools.ant.types.EnumeratedAttribute
      • getVersion

        public org.cyclonedx.Version getVersion()
        Translates this instance to a Version.
        Returns:
        CycloneDX version of this instance
        Throws:
        org.apache.tools.ant.BuildException - if the value can not be translated.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object