Class EclipseSourceLocation

java.lang.Object
org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceLocation
All Implemented Interfaces:
Serializable, ISourceLocation

public class EclipseSourceLocation extends Object implements ISourceLocation
See Also:
Serialized Form
  • Constructor Details

    • EclipseSourceLocation

      public EclipseSourceLocation(CompilationResult result, int startPos, int endPos)
  • Method Details

    • getCompilationResult

      public CompilationResult getCompilationResult()
    • getOffset

      public int getOffset()
      Specified by:
      getOffset in interface ISourceLocation
      Returns:
      offset into file
    • getStartPos

      public int getStartPos()
    • getEndPos

      public int getEndPos()
    • getSourceFile

      public File getSourceFile()
      Specified by:
      getSourceFile in interface ISourceLocation
      Returns:
      File source or NO_FILE if the implementation requires a non-null result or null otherwise
    • getLine

      public int getLine()
      Specified by:
      getLine in interface ISourceLocation
      Returns:
      0..MAX_LINE
    • getColumn

      public int getColumn()
      Specified by:
      getColumn in interface ISourceLocation
      Returns:
      int 0..MAX_COLUMN actual column or 0 if column input was ISourceLocation.NO_COLUMN
    • getEndLine

      public int getEndLine()
      Specified by:
      getEndLine in interface ISourceLocation
      Returns:
      getLine()..MAX_LINE
    • getContext

      public String getContext()
      Specified by:
      getContext in interface ISourceLocation
      Returns:
      String application-specific context for source
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      String {file:}line{:column}
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getSourceFileName

      public String getSourceFileName()
      Description copied from interface: ISourceLocation
      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)
      Specified by:
      getSourceFileName in interface ISourceLocation
      Returns:
      the name of the source file