Record Class SelectedClassResource

java.lang.Object
java.lang.Record
dev.archunitjava.importer.SelectedClassResource
All Implemented Interfaces:
Comparable<SelectedClassResource>

public record SelectedClassResource(String lookupScope, String logicalName, ClassFileResource winner, int selectedRelease, List<ClassFileResource> shadowedAlternatives) extends Record implements Comparable<SelectedClassResource>
One selected logical class resource plus every lower-precedence alternative.
  • Constructor Details

    • SelectedClassResource

      public SelectedClassResource(String lookupScope, String logicalName, ClassFileResource winner, int selectedRelease, List<ClassFileResource> shadowedAlternatives)
      Creates an instance of a SelectedClassResource record class.
      Parameters:
      lookupScope - the value for the lookupScope record component
      logicalName - the value for the logicalName record component
      winner - the value for the winner record component
      selectedRelease - the value for the selectedRelease record component
      shadowedAlternatives - the value for the shadowedAlternatives record component
  • Method Details

    • compareTo

      public int compareTo(SelectedClassResource other)
      Specified by:
      compareTo in interface Comparable<SelectedClassResource>
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • lookupScope

      public String lookupScope()
      Returns the value of the lookupScope record component.
      Returns:
      the value of the lookupScope record component
    • logicalName

      public String logicalName()
      Returns the value of the logicalName record component.
      Returns:
      the value of the logicalName record component
    • winner

      public ClassFileResource winner()
      Returns the value of the winner record component.
      Returns:
      the value of the winner record component
    • selectedRelease

      public int selectedRelease()
      Returns the value of the selectedRelease record component.
      Returns:
      the value of the selectedRelease record component
    • shadowedAlternatives

      public List<ClassFileResource> shadowedAlternatives()
      Returns the value of the shadowedAlternatives record component.
      Returns:
      the value of the shadowedAlternatives record component