Record Class CallHierarchyItem
java.lang.Object
java.lang.Record
smile.util.lsp.CallHierarchyItem
- Record Components:
name- the symbol name.kind- the LSP symbol kind integer.detail- optional detail string (e.g. the signature or container).uri- the document URI that defines this symbol.startLine- the 1-based start line of the symbol's name range.startCharacter- the 1-based start character of the symbol's name range.endLine- the 1-based end line of the symbol's name range.endCharacter- the 1-based end character of the symbol's name range.
public record CallHierarchyItem(String name, int kind, String detail, String uri, int startLine, int startCharacter, int endLine, int endCharacter)
extends Record
Represents a single item in a call hierarchy — a named function or method
that can serve as the focus of
LanguageService.incomingCalls(smile.util.lsp.CallHierarchyItem) or
LanguageService.outgoingCalls(smile.util.lsp.CallHierarchyItem) queries.
All position values are 1-based (as shown in editors).
-
Constructor Summary
ConstructorsConstructorDescriptionCallHierarchyItem(String name, int kind, String detail, String uri, int startLine, int startCharacter, int endLine, int endCharacter) Creates an instance of aCallHierarchyItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondetail()Returns the value of thedetailrecord component.intReturns the value of theendCharacterrecord component.intendLine()Returns the value of theendLinerecord component.final booleanIndicates whether some other object is "equal to" this one.static CallHierarchyItemfromProtocol(org.eclipse.lsp4j.CallHierarchyItem item) Creates aCallHierarchyItemfrom an LSP4JCallHierarchyItem.final inthashCode()Returns a hash code value for this object.intkind()Returns the value of thekindrecord component.location()Returns the location of this item's name range.name()Returns the value of thenamerecord component.intReturns the value of thestartCharacterrecord component.intReturns the value of thestartLinerecord component.org.eclipse.lsp4j.CallHierarchyItemConverts this item back to an LSP4JCallHierarchyItemfor use in follow-upcallHierarchy/incomingCallsorcallHierarchy/outgoingCallsrequests.toString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.
-
Constructor Details
-
CallHierarchyItem
public CallHierarchyItem(String name, int kind, String detail, String uri, int startLine, int startCharacter, int endLine, int endCharacter) Creates an instance of aCallHierarchyItemrecord class.- Parameters:
name- the value for thenamerecord componentkind- the value for thekindrecord componentdetail- the value for thedetailrecord componenturi- the value for theurirecord componentstartLine- the value for thestartLinerecord componentstartCharacter- the value for thestartCharacterrecord componentendLine- the value for theendLinerecord componentendCharacter- the value for theendCharacterrecord component
-
-
Method Details
-
fromProtocol
Creates aCallHierarchyItemfrom an LSP4JCallHierarchyItem.- Parameters:
item- the LSP4J call hierarchy item.- Returns:
- the equivalent editor-friendly item.
-
toProtocol
public org.eclipse.lsp4j.CallHierarchyItem toProtocol()Converts this item back to an LSP4JCallHierarchyItemfor use in follow-upcallHierarchy/incomingCallsorcallHierarchy/outgoingCallsrequests.- Returns:
- the LSP4J call hierarchy item with 0-based coordinates.
-
location
Returns the location of this item's name range.- Returns:
- the
LspLocation.
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
-
kind
-
detail
-
uri
-
startLine
-
startCharacter
public int startCharacter()Returns the value of thestartCharacterrecord component.- Returns:
- the value of the
startCharacterrecord component
-
endLine
-
endCharacter
public int endCharacter()Returns the value of theendCharacterrecord component.- Returns:
- the value of the
endCharacterrecord component
-