Record Class CallHierarchyCall

java.lang.Object
java.lang.Record
smile.util.lsp.CallHierarchyCall
Record Components:
item - the caller (for incoming) or callee (for outgoing).
ranges - the call-site ranges within the focus document; each entry is a four-element array [startLine, startChar, endLine, endChar] using 1-based coordinates.

public record CallHierarchyCall(CallHierarchyItem item, List<int[]> ranges) extends Record
Represents one edge in a call hierarchy graph — either an incoming call (a caller that invokes the focus item) or an outgoing call (a callee invoked by the focus item).

Each edge has a item() describing the other endpoint and a list of ranges() indicating the exact text ranges inside the focus document where the call occurs.

All position values are 1-based (as shown in editors).

  • Constructor Details

    • CallHierarchyCall

      public CallHierarchyCall(CallHierarchyItem item, List<int[]> ranges)
      Creates an instance of a CallHierarchyCall record class.
      Parameters:
      item - the value for the item record component
      ranges - the value for the ranges record component
  • Method Details

    • fromIncoming

      public static CallHierarchyCall fromIncoming(org.eclipse.lsp4j.CallHierarchyIncomingCall call)
      Creates a CallHierarchyCall from an LSP4J CallHierarchyIncomingCall.
      Parameters:
      call - the LSP4J incoming call.
      Returns:
      the equivalent editor-friendly call.
    • fromOutgoing

      public static CallHierarchyCall fromOutgoing(org.eclipse.lsp4j.CallHierarchyOutgoingCall call)
      Creates a CallHierarchyCall from an LSP4J CallHierarchyOutgoingCall.
      Parameters:
      call - the LSP4J outgoing call.
      Returns:
      the equivalent editor-friendly call.
    • toString

      public 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.
    • item

      public CallHierarchyItem item()
      Returns the value of the item record component.
      Returns:
      the value of the item record component
    • ranges

      public List<int[]> ranges()
      Returns the value of the ranges record component.
      Returns:
      the value of the ranges record component