Package org.eclipse.handly.ui.callhierarchy

## Class CallLocation

- java.lang.Object
- - org.eclipse.handly.ui.callhierarchy.CallLocation

- All Implemented Interfaces:
    `org.eclipse.core.runtime.IAdaptable`, `ICallLocation`

      public final class CallLocation
      extends java.lang.Object
      implements ICallLocation

  Default implementation of `ICallLocation`.

- - ### Field Summary

    - ### Fields inherited from interface org.eclipse.handly.ui.callhierarchy.ICallLocation

      `UNKOWN_LINE_NUMBER`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CallLocation​(java.lang.Object caller, java.lang.Object callee, java.lang.String callText, TextRange callRange, int lineNumber, ISnapshot snapshot)` | Creates a new call location object.
    `CallLocation​(java.lang.Object caller, java.lang.Object callee, CallTextInfo info)` | Creates a new call location object based on a `CallTextInfo`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `getCallee()` | Returns the underlying model element representing the callee.
    `java.lang.Object` | `getCaller()` | Returns the underlying model element representing the caller.
    `TextRange` | `getCallRange()` | Returns the text range of the call.
    `java.lang.String` | `getCallText()` | Returns the textual representation of the call.
    `int` | `getLineNumber()` | Returns the line number of the call.
    `ISnapshot` | `getSnapshot()` | Returns the snapshot on which this call location is based.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.handly.ui.callhierarchy.ICallLocation

      `getAdapter, getCallTextInfo`

- - ### Constructor Detail

    - #### CallLocation

          public CallLocation​(java.lang.Object caller,
                              java.lang.Object callee,
                              java.lang.String callText,
                              TextRange callRange,
                              int lineNumber,
                              ISnapshot snapshot)

      Creates a new call location object.
      Parameters:
        `caller` - the caller element, or `null` if unknown
        `callee` - the callee element, or `null` if unknown
        `callText` - the text of the call (not `null`)
        `callRange` - the text range of the call, or `null` if unknown
        `lineNumber` - the 0-based line number of the call, or `ICallLocation.UNKOWN_LINE_NUMBER` if unknown
        `snapshot` - the base snapshot for the call location, or `null` if unknown

    - #### CallLocation

          public CallLocation​(java.lang.Object caller,
                              java.lang.Object callee,
                              CallTextInfo info)

      Creates a new call location object based on a `CallTextInfo`.
      Parameters:
        `caller` - the caller element, or `null` if unknown
        `callee` - the callee element, or `null` if unknown
        `info` - the call text info (not `null`)

  - ### Method Detail

    - #### getCaller

          public java.lang.Object getCaller()

      Description copied from interface: `ICallLocation`
      Returns the underlying model element representing the caller.
      Specified by:
        `getCaller` in interface `ICallLocation`
      Returns:
        the caller element, or `null` if unknown

    - #### getCallee

          public java.lang.Object getCallee()

      Description copied from interface: `ICallLocation`
      Returns the underlying model element representing the callee.
      Specified by:
        `getCallee` in interface `ICallLocation`
      Returns:
        the callee element, or `null` if unknown

    - #### getCallText

          public java.lang.String getCallText()

      Description copied from interface: `ICallLocation`
      Returns the textual representation of the call.
      Specified by:
        `getCallText` in interface `ICallLocation`
      Returns:
        the text of the call (never `null`)

    - #### getCallRange

          public TextRange getCallRange()

      Description copied from interface: `ICallLocation`
      Returns the text range of the call.
      Specified by:
        `getCallRange` in interface `ICallLocation`
      Returns:
        the text range of the call, or `null` if unknown

    - #### getLineNumber

          public int getLineNumber()

      Description copied from interface: `ICallLocation`
      Returns the line number of the call. Note that the first line has the line number 0.
      Specified by:
        `getLineNumber` in interface `ICallLocation`
      Returns:
        the zero-based line number of the call, or `ICallLocation.UNKOWN_LINE_NUMBER` if unknown

    - #### getSnapshot

          public ISnapshot getSnapshot()

      Description copied from interface: `ICallLocation`
      Returns the snapshot on which this call location is based.
      Specified by:
        `getSnapshot` in interface `ICallLocation`
      Returns:
        the base snapshot for the call location, or `null` if unknown