Package org.apache.ant.cyclonedx
Class ComponentType
- java.lang.Object
-
- org.apache.tools.ant.types.EnumeratedAttribute
-
- org.apache.ant.cyclonedx.ComponentType
-
public class ComponentType extends org.apache.tools.ant.types.EnumeratedAttributeCycloneDX component type.Accepts the enum constants like
LIBRARYas well as the lowercase versionlibrary. The values are directly provided by CycloneDX Core's enum.
-
-
Constructor Summary
Constructors Constructor Description ComponentType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentTypefrom(org.cyclonedx.model.Component.Type type)Maps a CycloneDX type.org.cyclonedx.model.Component.TypegetType()Translates this instance to aComponent.Type.java.lang.String[]getValues()
-
-
-
Method Detail
-
getValues
public java.lang.String[] getValues()
- Specified by:
getValuesin classorg.apache.tools.ant.types.EnumeratedAttribute
-
getType
public org.cyclonedx.model.Component.Type getType()
Translates this instance to aComponent.Type.- Returns:
- CycloneDX type of this instance
- Throws:
org.apache.tools.ant.BuildException- if the value can not be translated.
-
from
public static ComponentType from(org.cyclonedx.model.Component.Type type)
Maps a CycloneDX type.- Parameters:
type- CycloneDX type.- Returns:
- translated type
-
-