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

Class Stmt

A common super-class of all statements.

Import path

import java

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAChild

Gets a child of this statement, if any.

getBasicBlock

Gets the basic block in which this statement occurs.

getCompilationUnit

Gets the compilation unit in which this statement occurs.

getControlFlowNode

Gets the ControlFlowNode corresponding to this statement.

getEnclosingCallable

Gets the immediately enclosing callable (method or constructor) whose body contains this statement.

getEnclosingStmt

Gets the statement containing this statement, if any.

getHalsteadID

This statement’s Halstead ID (used to compute Halstead metrics).

getIndex

Gets the index of this statement as a child of its parent.

getMetrics

Cast this statement to a class that provides access to metrics information.

getParent

Gets the parent of this statement.

isNthChildOf

Holds if this statement is the child of the specified parent at the specified (zero-based) position.

pp

Gets a printable representation of this statement. May include more detail than toString().

toString

Gets a textual representation of this element.

Inherited predicates

getAPrimaryQlClass

Gets the name of a primary CodeQL class to which this element belongs.

from Top
getFile

Gets the file associated with this element.

from Top
getLocation

Gets the source location for this element.

from Top
getNumberOfCommentLines

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

from Top
getNumberOfLinesOfCode

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

from Top
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from Top
getTotalNumberOfLines

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

from Top
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.

from Top