Class CallLocation
java.lang.Object
org.eclipse.handly.ui.callhierarchy.CallLocation
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,ICallLocation
Default implementation of
ICallLocation
.-
Field Summary
Fields inherited from interface org.eclipse.handly.ui.callhierarchy.ICallLocation
UNKOWN_LINE_NUMBER
-
Constructor Summary
ConstructorDescriptionCallLocation
(Object caller, Object callee, String callText, TextRange callRange, int lineNumber, ISnapshot snapshot) Creates a new call location object.CallLocation
(Object caller, Object callee, CallTextInfo info) Creates a new call location object based on aCallTextInfo
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying model element representing the callee.Returns the underlying model element representing the caller.Returns the text range of the call.Returns the textual representation of the call.int
Returns the line number of the call.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 Details
-
CallLocation
public CallLocation(Object caller, Object callee, String callText, TextRange callRange, int lineNumber, ISnapshot snapshot) Creates a new call location object.- Parameters:
caller
- the caller element, ornull
if unknowncallee
- the callee element, ornull
if unknowncallText
- the text of the call (notnull
)callRange
- the text range of the call, ornull
if unknownlineNumber
- the 0-based line number of the call, orICallLocation.UNKOWN_LINE_NUMBER
if unknownsnapshot
- the base snapshot for the call location, ornull
if unknown
-
CallLocation
Creates a new call location object based on aCallTextInfo
.- Parameters:
caller
- the caller element, ornull
if unknowncallee
- the callee element, ornull
if unknowninfo
- the call text info (notnull
)
-
-
Method Details
-
getCaller
Description copied from interface:ICallLocation
Returns the underlying model element representing the caller.- Specified by:
getCaller
in interfaceICallLocation
- Returns:
- the caller element, or
null
if unknown
-
getCallee
Description copied from interface:ICallLocation
Returns the underlying model element representing the callee.- Specified by:
getCallee
in interfaceICallLocation
- Returns:
- the callee element, or
null
if unknown
-
getCallText
Description copied from interface:ICallLocation
Returns the textual representation of the call.- Specified by:
getCallText
in interfaceICallLocation
- Returns:
- the text of the call (never
null
)
-
getCallRange
Description copied from interface:ICallLocation
Returns the text range of the call.- Specified by:
getCallRange
in interfaceICallLocation
- 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 interfaceICallLocation
- Returns:
- the zero-based line number of the call,
or
ICallLocation.UNKOWN_LINE_NUMBER
if unknown
-
getSnapshot
Description copied from interface:ICallLocation
Returns the snapshot on which this call location is based.- Specified by:
getSnapshot
in interfaceICallLocation
- Returns:
- the base snapshot for the call location,
or
null
if unknown
-