Package org.aspectj.bridge
Interface ISourceLocation
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
EclipseSourceLocation
,SourceLocation
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 Summary
Modifier and TypeFieldDescriptionstatic ISourceLocation
non-null but empty constant source locationstatic int
static int
static int
signal that column is not knownstatic File
non-null but empty (nonexisting) File constant -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
getLine()
int
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)
-
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
non-null but empty (nonexisting) File constant -
NO_COLUMN
static final int NO_COLUMNsignal that column is not known- See Also:
- Constant Field Values
-
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
-