Class ComponentType


  • public class ComponentType
    extends org.apache.tools.ant.types.EnumeratedAttribute
    CycloneDX component type.

    Accepts the enum constants like LIBRARY as well as the lowercase version library. The values are directly provided by CycloneDX Core's enum.

    • Field Summary

      • Fields inherited from class org.apache.tools.ant.types.EnumeratedAttribute

        value
    • Constructor Summary

      Constructors 
      Constructor Description
      ComponentType()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ComponentType from​(org.cyclonedx.model.Component.Type type)
      Maps a CycloneDX type.
      org.cyclonedx.model.Component.Type getType()
      Translates this instance to a Component.Type.
      java.lang.String[] getValues()  
      • 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ComponentType

        public ComponentType()
    • Method Detail

      • getValues

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

        public org.cyclonedx.model.Component.Type getType()
        Translates this instance to a Component.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