Record Class ParsedConstantEvidence

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

public record ParsedConstantEvidence(ParsedConstantEvidence.Kind kind, int constantPoolIndex, String descriptor, Optional<ParsedMethodHandle> methodHandle, Optional<ParsedDynamicConstant> dynamicConstant, Optional<ParsedConstantLoadSite> loadSite) extends Record implements Comparable<ParsedConstantEvidence>
Backend-neutral typed evidence for a relevant constant-pool entry.
  • Constructor Details

    • ParsedConstantEvidence

      public ParsedConstantEvidence(ParsedConstantEvidence.Kind kind, int constantPoolIndex, String descriptor, Optional<ParsedMethodHandle> methodHandle, Optional<ParsedDynamicConstant> dynamicConstant, Optional<ParsedConstantLoadSite> loadSite)
      Creates an instance of a ParsedConstantEvidence record class.
      Parameters:
      kind - the value for the kind record component
      constantPoolIndex - the value for the constantPoolIndex record component
      descriptor - the value for the descriptor record component
      methodHandle - the value for the methodHandle record component
      dynamicConstant - the value for the dynamicConstant record component
      loadSite - the value for the loadSite record component
  • Method Details

    • compareTo

      public int compareTo(ParsedConstantEvidence other)
      Specified by:
      compareTo in interface Comparable<ParsedConstantEvidence>
    • 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.
    • kind

      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • constantPoolIndex

      public int constantPoolIndex()
      Returns the value of the constantPoolIndex record component.
      Returns:
      the value of the constantPoolIndex record component
    • descriptor

      public String descriptor()
      Returns the value of the descriptor record component.
      Returns:
      the value of the descriptor record component
    • methodHandle

      public Optional<ParsedMethodHandle> methodHandle()
      Returns the value of the methodHandle record component.
      Returns:
      the value of the methodHandle record component
    • dynamicConstant

      public Optional<ParsedDynamicConstant> dynamicConstant()
      Returns the value of the dynamicConstant record component.
      Returns:
      the value of the dynamicConstant record component
    • loadSite

      public Optional<ParsedConstantLoadSite> loadSite()
      Returns the value of the loadSite record component.
      Returns:
      the value of the loadSite record component