Interface ISourceLocation

All Superinterfaces:
Serializable
All Known Implementing Classes:
SourceLocation

public interface ISourceLocation extends Serializable
Represent source location as a starting line/column and ending line in a source file. Implementations should be immutable. XXX why?
See Also:
SourceLocation
  • Field Details

    • MAX_LINE

      static final int MAX_LINE
      See Also:
      Constant Field Values
    • MAX_COLUMN

      static final int MAX_COLUMN
      See Also:
      Constant Field Values
    • NO_FILE

      static final File NO_FILE
      non-null but empty (nonexisting) File constant
    • NO_COLUMN

      static final int NO_COLUMN
      signal that column is not known
      See Also:
      Constant Field Values
    • EMPTY

      static final ISourceLocation EMPTY
      non-null but empty constant source location
  • Method Details

    • getSourceFile

      File getSourceFile()
      Returns:
      File source or NO_FILE if the implementation requires a non-null result or null otherwise
    • getLine

      int getLine()
      Returns:
      0..MAX_LINE
    • getColumn

      int getColumn()
      Returns:
      int 0..MAX_COLUMN actual column or 0 if column input was ISourceLocation.NO_COLUMN
    • getOffset

      int getOffset()
      Returns:
      offset into file
    • getEndLine

      int getEndLine()
      Returns:
      getLine()..MAX_LINE
    • getContext

      String getContext()
      Returns:
      String application-specific context for source
    • getSourceFileName

      String getSourceFileName()
      In the cases where getSourceFile().getName() returns a class file (for example when we have a binary aspect) this should return the name of the source file (for example BinaryAspect.aj)
      Returns:
      the name of the source file