Class ComponentDependencies

java.lang.Object
io.quarkus.sbom.ComponentDependencies

public final class ComponentDependencies extends Object
Represents the dependency relationships of a single component in an SBOM.

Each instance captures which other components (identified by their bom-ref strings) a given component depends on, along with an optional dependency type for SPDX compatibility.

In CycloneDX, the dependencyType is not used (all relationships are plain dependencies). In SPDX, the type distinguishes between DEPENDS_ON, DEV_DEPENDENCY_OF, etc.

  • Method Details

    • of

      public static ComponentDependencies of(String bomRef, Collection<String> dependsOn)
      Creates a ComponentDependencies with no dependency type.
      Parameters:
      bomRef - the bom-ref of the component that has these dependencies
      dependsOn - the bom-refs of the components it depends on
      Returns:
      a new instance
    • builder

      public static ComponentDependencies.Builder builder()
    • getBomRef

      public String getBomRef()
      The bom-ref of the component whose dependencies are described.
    • getDependencyType

      public String getDependencyType()
      The relationship type (e.g., "DEPENDS_ON", "DEV_DEPENDENCY_OF"). May be null when the SBOM format does not support typed dependencies.
    • getDependsOn

      public Collection<String> getDependsOn()
      The bom-refs of the components this component depends on.