Package org.codehaus.groovy.ast.stmt
Class Statement
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.stmt.Statement
- All Implemented Interfaces:
NodeMetaDataHandler
- Direct Known Subclasses:
AssertStatement,BlockStatement,BreakStatement,BytecodeSequence,CaseStatement,CatchStatement,ContinueStatement,DoWhileStatement,EmptyStatement,ExpressionStatement,ForStatement,IfStatement,ReturnStatement,SwitchStatement,SynchronizedStatement,ThrowStatement,TryCatchStatement,WhileStatement
Base class for any statement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatementAnnotation(AnnotationNode annotation) Attaches a statement-level annotation to this statement.voidaddStatementLabel(String label) voidcopyStatementLabels(Statement that) Returns the list of statement-level annotations attached to this statement.Deprecated.booleanisEmpty()voidsetStatementLabel(String label) Methods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler
copyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData
-
Constructor Details
-
Statement
public Statement()
-
-
Method Details
-
getStatementLabels
-
getStatementLabel
Deprecated. -
setStatementLabel
-
addStatementLabel
-
copyStatementLabels
-
getStatementAnnotations
Returns the list of statement-level annotations attached to this statement. These are Groovy-only source-retention annotations that do not appear at the JVM level; they are processed by registeredASTTransformations.- Returns:
- an unmodifiable view of the annotations list, never
null - Since:
- 6.0.0
-
addStatementAnnotation
Attaches a statement-level annotation to this statement.- Parameters:
annotation- the annotation to attach- Since:
- 6.0.0
-
isEmpty
public boolean isEmpty()
-