Package org.codehaus.groovy.ast.stmt
Class EmptyStatement
- java.lang.Object
-
- org.codehaus.groovy.ast.ASTNode
-
- org.codehaus.groovy.ast.stmt.Statement
-
- org.codehaus.groovy.ast.stmt.EmptyStatement
-
- All Implemented Interfaces:
NodeMetaDataHandler
public class EmptyStatement extends Statement
Represents an empty statement
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyStatementINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStatementLabel(String label)voidcopyNodeMetaData(NodeMetaDataHandler other)Copies all node meta data from the other node to this onebooleanisEmpty()ObjectputNodeMetaData(Object key, Object value)Sets the node meta data but allows overwriting values.voidremoveNodeMetaData(Object key)Removes a node meta data entry.voidsetColumnNumber(int columnNumber)voidsetLastColumnNumber(int lastColumnNumber)voidsetLastLineNumber(int lastLineNumber)voidsetLineNumber(int lineNumber)voidsetMetaDataMap(Map<?,?> metaDataMap)voidsetNodeMetaData(Object key, Object value)Sets the node meta data.voidsetSourcePosition(ASTNode node)Sets the source position using another ASTNode.voidsetStatementLabel(String label)voidvisit(GroovyCodeVisitor visitor)-
Methods inherited from class org.codehaus.groovy.ast.stmt.Statement
getStatementLabel, getStatementLabels
-
Methods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, equals, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler
getNodeMetaData, getNodeMetaData
-
-
-
-
Field Detail
-
INSTANCE
public static final EmptyStatement INSTANCE
-
-
Method Detail
-
visit
public void visit(GroovyCodeVisitor visitor)
-
setStatementLabel
public void setStatementLabel(String label)
- Overrides:
setStatementLabelin classStatement
-
addStatementLabel
public void addStatementLabel(String label)
- Overrides:
addStatementLabelin classStatement
-
setLineNumber
public void setLineNumber(int lineNumber)
- Overrides:
setLineNumberin classASTNode
-
setColumnNumber
public void setColumnNumber(int columnNumber)
- Overrides:
setColumnNumberin classASTNode
-
setLastLineNumber
public void setLastLineNumber(int lastLineNumber)
- Overrides:
setLastLineNumberin classASTNode
-
setLastColumnNumber
public void setLastColumnNumber(int lastColumnNumber)
- Overrides:
setLastColumnNumberin classASTNode
-
setSourcePosition
public void setSourcePosition(ASTNode node)
Description copied from class:ASTNodeSets the source position using another ASTNode. The sourcePosition consists of a line/column pair for the start and a line/column pair for the end of the expression or statement- Overrides:
setSourcePositionin classASTNode- Parameters:
node- - the node used to configure the position information
-
copyNodeMetaData
public void copyNodeMetaData(NodeMetaDataHandler other)
Description copied from interface:NodeMetaDataHandlerCopies all node meta data from the other node to this one- Parameters:
other- - the other node
-
setNodeMetaData
public void setNodeMetaData(Object key, Object value)
Description copied from interface:NodeMetaDataHandlerSets the node meta data.- Parameters:
key- - the meta data keyvalue- - the meta data value
-
putNodeMetaData
public Object putNodeMetaData(Object key, Object value)
Description copied from interface:NodeMetaDataHandlerSets the node meta data but allows overwriting values.- Parameters:
key- - the meta data keyvalue- - the meta data value- Returns:
- the old node meta data value for this key
-
removeNodeMetaData
public void removeNodeMetaData(Object key)
Description copied from interface:NodeMetaDataHandlerRemoves a node meta data entry.- Parameters:
key- - the meta data key
-
setMetaDataMap
public void setMetaDataMap(Map<?,?> metaDataMap)
- Specified by:
setMetaDataMapin interfaceNodeMetaDataHandler- Overrides:
setMetaDataMapin classASTNode
-
-