Class ComponentScope


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

    Accepts the enum constants like OPTIONAL as well as the lowercase version optional. 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
      ComponentScope()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ComponentScope from​(org.cyclonedx.model.Component.Scope scope)
      Maps a CycloneDX scope.
      org.cyclonedx.model.Component.Scope getScope()
      Translates this instance to a Component.Scope.
      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

      • ComponentScope

        public ComponentScope()
    • Method Detail

      • getValues

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

        public org.cyclonedx.model.Component.Scope getScope()
        Translates this instance to a Component.Scope.
        Returns:
        translated scope
        Throws:
        org.apache.tools.ant.BuildException - if the value can not be translated.
      • from

        public static ComponentScope from​(org.cyclonedx.model.Component.Scope scope)
        Maps a CycloneDX scope.
        Parameters:
        scope - CycloneDX scope.
        Returns:
        translated scope