Record Class Dependency

java.lang.Object
java.lang.Record
network.ike.workspace.Dependency
Record Components:
subproject - the name of the depended-on subproject
relationship - the nature of the dependency — one of KNOWN_RELATIONSHIPS
versionProperty - optional POM property name that tracks the upstream subproject's version (e.g., "ike-maven-plugin.version"). Used by ike:ws-release to update version references after releasing an upstream subproject. Null if no property tracking is needed.

public record Dependency(String subproject, String relationship, String versionProperty) extends Record
An inter-repository dependency declared in a subproject's depends-on list.

Relationship semantics (see IKE-WORKSPACE.md):

  • build — needs the upstream's compiled artifacts; orders the workspace build.
  • content — references the upstream's architecture or concepts; a change may require only review.
  • tooling — uses the upstream's CLI tools or Maven plugins.
  • bundle — packages the upstream's artifact into an assembly at package time, resolved from the repository (~/.m2 or a snapshot repo) rather than built from the workspace. Excluded from build ordering and cycle detection, still traversed by cascade analysis (IKE-Network/ike-issues#963). Carries a resolution hazard: the workspace does not guarantee the artifact is built first.
  • Field Details

    • KNOWN_RELATIONSHIPS

      public static final Set<String> KNOWN_RELATIONSHIPS
      The recognized relationship: values. tool-time is the legacy spelling of tooling, kept for manifests written before the standard settled on the shorter name.
  • Constructor Details

    • Dependency

      public Dependency(String subproject, String relationship)
      Two-arg constructor for backwards compatibility (no version-property).
      Parameters:
      subproject - the name of the depended-on subproject
      relationship - the nature of the dependency
    • Dependency

      public Dependency(String subproject, String relationship, String versionProperty)
      Creates an instance of a Dependency record class.
      Parameters:
      subproject - the value for the subproject record component
      relationship - the value for the relationship record component
      versionProperty - the value for the versionProperty record component
  • Method Details

    • ordersBuild

      public boolean ordersBuild()
      Whether this edge constrains workspace build order. Every relationship does except bundle, whose artifact is repository-resolved at package time and therefore orders nothing (IKE-Network/ike-issues#963).
      Returns:
      true when the edge participates in topological sort and cycle detection
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • subproject

      public String subproject()
      Returns the value of the subproject record component.
      Returns:
      the value of the subproject record component
    • relationship

      public String relationship()
      Returns the value of the relationship record component.
      Returns:
      the value of the relationship record component
    • versionProperty

      public String versionProperty()
      Returns the value of the versionProperty record component.
      Returns:
      the value of the versionProperty record component