Interface ISourceRange

All Known Implementing Classes:
SourceRange

public interface ISourceRange
A source range defines an element's source coordinates relative to its source buffer.

Clients may use the method SourceRange.isAvailable(ISourceRange) in order to find out if a source range is available. This method returns false when the source range offset is equals to -1.

Clients may use the default implementation provided by SourceRange.

See Also:
Restriction:
This interface is not intended to be implemented by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of characters of the source code for this element, relative to the source buffer in which this element is contained.
    int
    Returns the 0-based index of the first character of the source code for this element, relative to the source buffer in which this element is contained.
  • Method Details

    • getLength

      int getLength()
      Returns the number of characters of the source code for this element, relative to the source buffer in which this element is contained.
      Returns:
      the number of characters of the source code for this element, relative to the source buffer in which this element is contained
    • getOffset

      int getOffset()
      Returns the 0-based index of the first character of the source code for this element, relative to the source buffer in which this element is contained. However, if the element has no associated source code, an implementation may return -1.
      Returns:
      the 0-based index of the first character of the source code for this element, relative to the source buffer in which this element is contained. However, if the element has no associated source code, an implementation may return -1.