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 ofICallLocation.
-
-
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 aCallTextInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetCallee()Returns the underlying model element representing the callee.java.lang.ObjectgetCaller()Returns the underlying model element representing the caller.TextRangegetCallRange()Returns the text range of the call.java.lang.StringgetCallText()Returns the textual representation of the call.intgetLineNumber()Returns the line number of the call.ISnapshotgetSnapshot()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, ornullif unknowncallee- the callee element, ornullif unknowncallText- the text of the call (notnull)callRange- the text range of the call, ornullif unknownlineNumber- the 0-based line number of the call, orICallLocation.UNKOWN_LINE_NUMBERif unknownsnapshot- the base snapshot for the call location, ornullif unknown
-
CallLocation
public CallLocation(java.lang.Object caller, java.lang.Object callee, CallTextInfo info)Creates a new call location object based on aCallTextInfo.- Parameters:
caller- the caller element, ornullif unknowncallee- the callee element, ornullif unknowninfo- the call text info (notnull)
-
-
Method Detail
-
getCaller
public java.lang.Object getCaller()
Description copied from interface:ICallLocationReturns the underlying model element representing the caller.- Specified by:
getCallerin interfaceICallLocation- Returns:
- the caller element, or
nullif unknown
-
getCallee
public java.lang.Object getCallee()
Description copied from interface:ICallLocationReturns the underlying model element representing the callee.- Specified by:
getCalleein interfaceICallLocation- Returns:
- the callee element, or
nullif unknown
-
getCallText
public java.lang.String getCallText()
Description copied from interface:ICallLocationReturns the textual representation of the call.- Specified by:
getCallTextin interfaceICallLocation- Returns:
- the text of the call (never
null)
-
getCallRange
public TextRange getCallRange()
Description copied from interface:ICallLocationReturns the text range of the call.- Specified by:
getCallRangein interfaceICallLocation- Returns:
- the text range of the call, or
nullif unknown
-
getLineNumber
public int getLineNumber()
Description copied from interface:ICallLocationReturns the line number of the call. Note that the first line has the line number 0.- Specified by:
getLineNumberin interfaceICallLocation- Returns:
- the zero-based line number of the call,
or
ICallLocation.UNKOWN_LINE_NUMBERif unknown
-
getSnapshot
public ISnapshot getSnapshot()
Description copied from interface:ICallLocationReturns the snapshot on which this call location is based.- Specified by:
getSnapshotin interfaceICallLocation- Returns:
- the base snapshot for the call location,
or
nullif unknown
-
-