Continue Statement
ContinueStmt Entity
In Java, the continue statement is used within loops (for, while, do-while) to skip the rest of the current iteration and immediately jump to the next iteration of the loop. When encountered, it stops the current iteration and continues with the next one, bypassing any code that comes after the continue statement within the loop body. This is particularly useful when you want to skip specific iterations based on certain conditions while allowing the loop to continue its normal execution for other cases.
Example
Attributes
Method | Description |
---|---|
GetAPrimaryQlClass() string | Returns the primary CodeQL class name for this entity |
GetHalsteadID() int | Returns the Halstead ID metric for this continue statement |
GetLabel() string | Gets the label associated with this continue statement if any |
hasLabel() bool | Checks if this continue statement has a label attached to it |
GetPP() string | Returns the pretty-printed representation of this statement |
ToString() string | Returns a string representation of the continue statement |