Package org.eclipse.cdt.core.dom.ast
Interface IASTFileLocation
-
- All Superinterfaces:
IASTNodeLocation
- All Known Subinterfaces:
IASTImageLocation
public interface IASTFileLocation extends IASTNodeLocation
Represents a node location that is directly in the source file.- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNodeLocation
EMPTY_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IASTPreprocessorIncludeStatementgetContextInclusionStatement()Returns the inclusion statement that included this file, ornullfor a top-level file.intgetEndingLineNumber()Returns the ending line number.StringgetFileName()The name of the file.intgetNodeLength()Returns the length of this location in terms of characters.intgetNodeOffset()Returns the offset within the file where this location starts.intgetStartingLineNumber()Returns the starting line number.-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNodeLocation
asFileLocation
-
-
-
-
Method Detail
-
getFileName
String getFileName()
The name of the file. Should not be null.- Returns:
- the name of the file
-
getNodeOffset
int getNodeOffset()
Returns the offset within the file where this location starts.- Specified by:
getNodeOffsetin interfaceIASTNodeLocation
-
getNodeLength
int getNodeLength()
Returns the length of this location in terms of characters.- Specified by:
getNodeLengthin interfaceIASTNodeLocation
-
getStartingLineNumber
int getStartingLineNumber()
Returns the starting line number. Locations obtained via the index do not have line numbers and return0.- Returns:
- the 1-based line number, or
0if not applicable
-
getEndingLineNumber
int getEndingLineNumber()
Returns the ending line number. Locations obtained via the index do not have line numbers and return0.- Returns:
- the 1-based line number, or
0if not applicable
-
getContextInclusionStatement
IASTPreprocessorIncludeStatement getContextInclusionStatement()
Returns the inclusion statement that included this file, ornullfor a top-level file. Alsonullwhen the file location does not belong to an AST node, e.g. if it is obtained from a name in the index.- Since:
- 5.4
-
-