Interface ICallLocation
-
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
- All Known Implementing Classes:
CallLocation
public interface ICallLocation extends org.eclipse.core.runtime.IAdaptableRepresents a call and the associated location.
-
-
Field Summary
Fields Modifier and Type Field Description static intUNKOWN_LINE_NUMBERIndicates 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> TgetAdapter(java.lang.Class<T> adapter)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.default CallTextInfogetCallTextInfo()Returns the call text info for this call location.intgetLineNumber()Returns the line number of the call.ISnapshotgetSnapshot()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
ICallLocationreturns thecallerif it is an instance of the given class. As a fallback, it delegates to the Platform's adapter manager.- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
-
getCaller
java.lang.Object getCaller()
Returns the underlying model element representing the caller.- Returns:
- the caller element, or
nullif unknown
-
getCallee
java.lang.Object getCallee()
Returns the underlying model element representing the callee.- Returns:
- the callee element, or
nullif 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
nullif 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_NUMBERif unknown
-
getSnapshot
ISnapshot getSnapshot()
Returns the snapshot on which this call location is based.- Returns:
- the base snapshot for the call location,
or
nullif unknown
-
-