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(java.lang.String label)voidcopyNodeMetaData(NodeMetaDataHandler other)Copies all node meta data from the other node to this onebooleanisEmpty()java.lang.ObjectputNodeMetaData(java.lang.Object key, java.lang.Object value)Sets the node meta data but allows overwriting values.voidremoveNodeMetaData(java.lang.Object key)Removes a node meta data entry.voidsetColumnNumber(int columnNumber)voidsetLastColumnNumber(int lastColumnNumber)voidsetLastLineNumber(int lastLineNumber)voidsetLineNumber(int lineNumber)voidsetMetaDataMap(java.util.Map<?,?> metaDataMap)voidsetNodeMetaData(java.lang.Object key, java.lang.Object value)Sets the node meta data.voidsetSourcePosition(ASTNode node)Sets the source position using another ASTNode.voidsetStatementLabel(java.lang.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(java.lang.String label)
- Overrides:
setStatementLabelin classStatement
-
addStatementLabel
public void addStatementLabel(java.lang.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(java.lang.Object key, java.lang.Object value)Description copied from interface:NodeMetaDataHandlerSets the node meta data.- Parameters:
key- - the meta data keyvalue- - the meta data value
-
putNodeMetaData
public java.lang.Object putNodeMetaData(java.lang.Object key, java.lang.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(java.lang.Object key)
Description copied from interface:NodeMetaDataHandlerRemoves a node meta data entry.- Parameters:
key- - the meta data key
-
setMetaDataMap
public void setMetaDataMap(java.util.Map<?,?> metaDataMap)
- Specified by:
setMetaDataMapin interfaceNodeMetaDataHandler- Overrides:
setMetaDataMapin classASTNode
-
-