Interface ICallLocation
-
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
- All Known Implementing Classes:
CallLocation
public interface ICallLocation extends org.eclipse.core.runtime.IAdaptable
Represents a call and the associated location.
-
-
Field Summary
Fields Modifier and Type Field Description static int
UNKOWN_LINE_NUMBER
Indicates that the line number of the call is unknown.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> T
getAdapter(java.lang.Class<T> adapter)
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.default CallTextInfo
getCallTextInfo()
Returns the call text info for this call location.int
getLineNumber()
Returns the line number of the call.ISnapshot
getSnapshot()
Returns the snapshot on which this call location is based.
-
-
-
Field Detail
-
UNKOWN_LINE_NUMBER
static final int UNKOWN_LINE_NUMBER
Indicates that the line number of the call is unknown.- See Also:
getLineNumber()
, Constant Field Values
-
-
Method Detail
-
getAdapter
default <T> T getAdapter(java.lang.Class<T> adapter)
Default implementation of this method in
ICallLocation
returns thecaller
if it is an instance of the given class. As a fallback, it delegates to the Platform's adapter manager.- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
-
getCaller
java.lang.Object getCaller()
Returns the underlying model element representing the caller.- Returns:
- the caller element, or
null
if unknown
-
getCallee
java.lang.Object getCallee()
Returns the underlying model element representing the callee.- Returns:
- the callee element, or
null
if unknown
-
getCallTextInfo
default CallTextInfo getCallTextInfo()
Returns the call text info for this call location.Default implementation returns a new instance of the call text info based on the information from this call location.
- Returns:
- the call text info (never
null
)
-
getCallText
java.lang.String getCallText()
Returns the textual representation of the call.- Returns:
- the text of the call (never
null
)
-
getCallRange
TextRange getCallRange()
Returns the text range of the call.- Returns:
- the text range of the call, or
null
if unknown
-
getLineNumber
int getLineNumber()
Returns the line number of the call. Note that the first line has the line number 0.- Returns:
- the zero-based line number of the call,
or
UNKOWN_LINE_NUMBER
if unknown
-
getSnapshot
ISnapshot getSnapshot()
Returns the snapshot on which this call location is based.- Returns:
- the base snapshot for the call location,
or
null
if unknown
-
-