Package org.aspectj.bridge
Klasse SourceLocation
java.lang.Object
org.aspectj.bridge.SourceLocation
- Alle implementierten Schnittstellen:
Serializable
,ISourceLocation
Immutable source location. This guarantees that the source file is not null and that the numeric values are positive and line ≤
endLine.
- Siehe auch:
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final ISourceLocation
used when SourceLocation is not availableVon Schnittstelle geerbte Felder org.aspectj.bridge.ISourceLocation
EMPTY, MAX_COLUMN, MAX_LINE, NO_COLUMN, NO_FILE
-
Konstruktorübersicht
KonstruktorBeschreibungSourceLocation
(File file, int line) Same as SourceLocation(file, line, line, 0), except that column is not rendered during toString()SourceLocation
(File file, int line, int endLine) same as SourceLocation(file, line, endLine, ISourceLocation.NO_COLUMN)SourceLocation
(File file, int line, int endLine, int column) SourceLocation
(File file, int line, int endLine, int column, String context) SourceLocation
(File file, int line, int endLine, int column, String context, String sourceFileName) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
int
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)int
hashCode()
void
setOffset
(int i) toString()
static final void
validColumn
(int column) static final void
validLine
(int line)
-
Felddetails
-
UNKNOWN
used when SourceLocation is not available
-
-
Konstruktordetails
-
SourceLocation
Same as SourceLocation(file, line, line, 0), except that column is not rendered during toString() -
SourceLocation
same as SourceLocation(file, line, endLine, ISourceLocation.NO_COLUMN) -
SourceLocation
- Parameter:
file
- File of the source; if null, use ISourceLocation.NO_FILE, not nullline
- int starting line of the location - positive numberendLine
- int ending line of the location - ≤ starting linecolumn
- int character position of starting location - positive number
-
SourceLocation
-
SourceLocation
-
-
Methodendetails
-
validLine
public static final void validLine(int line) - Löst aus:
IllegalArgumentException
- if the input would not be a valid line
-
validColumn
public static final void validColumn(int column) - Löst aus:
IllegalArgumentException
- if the input would not be a valid column
-
getSourceFile
- Angegeben von:
getSourceFile
in SchnittstelleISourceLocation
- Gibt zurück:
- File source or NO_FILE if the implementation requires a non-null result or null otherwise
-
getLine
public int getLine()- Angegeben von:
getLine
in SchnittstelleISourceLocation
- Gibt zurück:
- 0..MAX_LINE
-
getColumn
public int getColumn()- Angegeben von:
getColumn
in SchnittstelleISourceLocation
- Gibt zurück:
- int actual column or 0 if not available per constructor treatment of ISourceLocation.NO_COLUMN
-
getEndLine
public int getEndLine()- Angegeben von:
getEndLine
in SchnittstelleISourceLocation
- Gibt zurück:
- getLine()..MAX_LINE
-
getContext
- Angegeben von:
getContext
in SchnittstelleISourceLocation
- Gibt zurück:
- null String or application-specific context
-
toString
-
getOffset
public int getOffset()- Angegeben von:
getOffset
in SchnittstelleISourceLocation
- Gibt zurück:
- offset into file
-
setOffset
public void setOffset(int i) -
getSourceFileName
Beschreibung aus Schnittstelle kopiert: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)- Angegeben von:
getSourceFileName
in SchnittstelleISourceLocation
- Gibt zurück:
- the name of the source file
-
equals
-
hashCode
public int hashCode()
-