public class ContinueStatement
extends Statement
Represents a continue statement that skips the remainder of the current loop iteration. When a continue statement is encountered, control flow jumps to the next iteration of the innermost enclosing loop. Labeled continue statements can skip to the next iteration of an outer loop.
| Constructor and description |
|---|
ContinueStatement()Constructs an unlabeled continue statement that continues the innermost enclosing loop. |
ContinueStatement(String label)Constructs a labeled continue statement that continues the enclosing loop with the given label. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
getLabel()Returns the label associated with this continue statement. |
|
public void |
visit(GroovyCodeVisitor visitor) |
| Methods inherited from class | Name |
|---|---|
class Statement |
addStatementAnnotation, addStatementLabel, copyStatementLabels, getStatementAnnotations, getStatementLabel, getStatementLabels, isEmpty, setStatementLabel |
class ASTNode |
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit |
Constructs an unlabeled continue statement that continues the innermost enclosing loop.
Constructs a labeled continue statement that continues the enclosing loop with the given label.
label - the name of the label to continue to, or null for an unlabeled continueReturns the label associated with this continue statement.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.