Package org.apache.ant.cyclonedx
Class SpecVersion
- java.lang.Object
-
- org.apache.tools.ant.types.EnumeratedAttribute
-
- org.apache.ant.cyclonedx.SpecVersion
-
public class SpecVersion extends org.apache.tools.ant.types.EnumeratedAttributeCycloneDX specification version to use for the SBOM.Accepts the enum constants like
VERSION_17as well as the human readable version1.7. The values are directly provided by CycloneDX Core's enum.
-
-
Field Summary
Fields Modifier and Type Field Description static SpecVersionDEFAULTDefault spec version.
-
Constructor Summary
Constructors Constructor Description SpecVersion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.String[]getValues()org.cyclonedx.VersiongetVersion()Translates this instance to aVersion.inthashCode()
-
-
-
Field Detail
-
DEFAULT
public static final SpecVersion DEFAULT
Default spec version.
-
-
Method Detail
-
getValues
public java.lang.String[] getValues()
- Specified by:
getValuesin classorg.apache.tools.ant.types.EnumeratedAttribute
-
getVersion
public org.cyclonedx.Version getVersion()
Translates this instance to aVersion.- 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-