CodeQL library for Java/Kotlin
codeql/java-all 7.2.0 (changelog, source)
Search

Class Location

A location maps language elements to positions in source files.

Import path

import java

Direct supertypes

Known direct subtypes

    Predicates

    getEndColumn

    Gets the 1-based column number (inclusive) where this location ends.

    getEndLine

    Gets the 1-based line number (inclusive) where this location ends.

    getFile

    Gets the file containing this location.

    getNumberOfCommentLines

    Gets the number of comment lines that this location ranges over.

    getNumberOfLines

    Gets the total number of lines that this location ranges over, including lines of code, comment and whitespace-only lines.

    getNumberOfLinesOfCode

    Gets the number of lines of code that this location ranges over.

    getStartColumn

    Gets the 1-based column number (inclusive) where this location starts.

    getStartLine

    Gets the 1-based line number (inclusive) where this location starts.

    hasLocationInfo

    Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

    toString

    Gets a string representation containing the file and range for this location.