Record Class BomEntry

java.lang.Object
java.lang.Record
network.ike.plugin.BomEntry
Record Components:
groupId - Maven group ID
artifactId - Maven artifact ID
version - resolved version string
classifier - optional classifier (e.g., "claude"); null if absent
type - packaging type (e.g., "jar", "zip"); null defaults to jar
scope - dependency scope (e.g., "test", "provided"); null defaults to compile

public record BomEntry(String groupId, String artifactId, String version, String classifier, String type, String scope) extends Record
A single dependency entry in a Bill of Materials POM.

Decouples BOM XML generation from Maven's Dependency model so the generation logic is testable with plain records.

  • Constructor Details

    • BomEntry

      public BomEntry(String groupId, String artifactId, String version, String classifier, String type, String scope)
      Creates an instance of a BomEntry record class.
      Parameters:
      groupId - the value for the groupId record component
      artifactId - the value for the artifactId record component
      version - the value for the version record component
      classifier - the value for the classifier record component
      type - the value for the type record component
      scope - the value for the scope record component
  • Method Details

    • 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.
    • groupId

      public String groupId()
      Returns the value of the groupId record component.
      Returns:
      the value of the groupId record component
    • artifactId

      public String artifactId()
      Returns the value of the artifactId record component.
      Returns:
      the value of the artifactId record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • classifier

      public String classifier()
      Returns the value of the classifier record component.
      Returns:
      the value of the classifier record component
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • scope

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