public interface SourcePosition
extends java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static SourcePosition |
NOPOSITION |
Modifier and Type | Method and Description |
---|---|
int |
getColumn()
Gets the column in the source file (1 indexed).
|
CompilationUnit |
getCompilationUnit()
Gets the compilation unit for this position.
|
int |
getEndColumn()
Gets the end column in the source file (1 indexed).
|
int |
getEndLine()
Gets the end line in the source file (1 indexed).
|
java.io.File |
getFile()
Gets the file for this position.
|
int |
getLine()
Gets the line in the source file (1 indexed).
|
int |
getSourceEnd()
Gets the index at which the position ends in the source file.
|
int |
getSourceStart()
Gets the index at which the position starts in the source file.
|
boolean |
isValidPosition() |
java.lang.String |
toString()
Returns a string representation of this position in the form
"sourcefile:line", or "sourcefile" if no line number is available.
|
static final SourcePosition NOPOSITION
boolean isValidPosition()
java.lang.String toString()
toString
in class java.lang.Object
java.io.File getFile()
CompilationUnit getCompilationUnit()
int getLine()
getSourceStart()
}.
For CtNamedElement the line is where the name is declared.int getEndLine()
getSourceEnd()
}.int getColumn()
Environment.getTabulationSize()
and
CtCompilationUnit.getOriginalSourceCode()
. Prefer getSourceStart()
.int getEndColumn()
Environment.getTabulationSize()
and
CtCompilationUnit.getOriginalSourceCode()
. Prefer getSourceEnd()
.int getSourceEnd()
int getSourceStart()
Copyright © 2007–2021 Inria. All rights reserved.