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
`IASTPreprocessorIncludeStatement` `getContextInclusionStatement()` Returns the inclusion statement that included this file, or `null` for a top-level file.
`int` `getEndingLineNumber()` Returns the ending line number.
`String` `getFileName()` The name of the file.
`int` `getNodeLength()` Returns the length of this location in terms of characters.
`int` `getNodeOffset()` Returns the offset within the file where this location starts.
`int` `getStartingLineNumber()` 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:
  `getNodeOffset` in interface `IASTNodeLocation`

#### getNodeLength

    int getNodeLength()

Returns the length of this location in terms of characters.

Specified by:
  `getNodeLength` in interface `IASTNodeLocation`

#### getStartingLineNumber

    int getStartingLineNumber()

Returns the starting line number. Locations obtained via the index do not have line numbers and return `0`.

Returns:
  the 1-based line number, or `0` if not applicable

#### getEndingLineNumber

    int getEndingLineNumber()

Returns the ending line number. Locations obtained via the index do not have line numbers and return `0`.

Returns:
  the 1-based line number, or `0` if not applicable

#### getContextInclusionStatement

    IASTPreprocessorIncludeStatement getContextInclusionStatement()

Returns the inclusion statement that included this file, or `null` for a top-level file. Also `null` when 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