org.aspectj.ajdt.internal.compiler.lookup
Class EclipseSourceLocation

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

public class EclipseSourceLocation
extends java.lang.Object
implements ISourceLocation

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.aspectj.bridge.ISourceLocation
EMPTY, MAX_COLUMN, MAX_LINE, NO_COLUMN, NO_FILE
 
Constructor Summary
EclipseSourceLocation(CompilationResult result, int startPos, int endPos)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 int getColumn()
           
 CompilationResult getCompilationResult()
           
 java.lang.String getContext()
           
 int getEndLine()
           
 int getEndPos()
           
 int getLine()
           
 int getOffset()
           
 java.io.File getSourceFile()
           
 java.lang.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)
 int getStartPos()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EclipseSourceLocation

public EclipseSourceLocation(CompilationResult result,
                             int startPos,
                             int endPos)
Method Detail

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 java.io.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 java.lang.String getContext()
Specified by:
getContext in interface ISourceLocation
Returns:
String application-specific context for source

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String {file:}line{:column}

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getSourceFileName

public java.lang.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