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 EmptyStatement
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatementLabel(String label)
void
copyNodeMetaData(NodeMetaDataHandler other)
Copies all node meta data from the other node to this oneboolean
isEmpty()
Object
putNodeMetaData(Object key, Object value)
Sets the node meta data but allows overwriting values.void
removeNodeMetaData(Object key)
Removes a node meta data entry.void
setColumnNumber(int columnNumber)
void
setLastColumnNumber(int lastColumnNumber)
void
setLastLineNumber(int lastLineNumber)
void
setLineNumber(int lineNumber)
void
setMetaDataMap(Map<?,?> metaDataMap)
void
setNodeMetaData(Object key, Object value)
Sets the node meta data.void
setSourcePosition(ASTNode node)
Sets the source position using another ASTNode.void
setStatementLabel(String label)
void
visit(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:
setStatementLabel
in classStatement
-
addStatementLabel
public void addStatementLabel(String label)
- Overrides:
addStatementLabel
in classStatement
-
setLineNumber
public void setLineNumber(int lineNumber)
- Overrides:
setLineNumber
in classASTNode
-
setColumnNumber
public void setColumnNumber(int columnNumber)
- Overrides:
setColumnNumber
in classASTNode
-
setLastLineNumber
public void setLastLineNumber(int lastLineNumber)
- Overrides:
setLastLineNumber
in classASTNode
-
setLastColumnNumber
public void setLastColumnNumber(int lastColumnNumber)
- Overrides:
setLastColumnNumber
in classASTNode
-
setSourcePosition
public void setSourcePosition(ASTNode node)
Description copied from class:ASTNode
Sets 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:
setSourcePosition
in classASTNode
- Parameters:
node
- - the node used to configure the position information
-
copyNodeMetaData
public void copyNodeMetaData(NodeMetaDataHandler other)
Description copied from interface:NodeMetaDataHandler
Copies 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:NodeMetaDataHandler
Sets 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:NodeMetaDataHandler
Sets 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:NodeMetaDataHandler
Removes a node meta data entry.- Parameters:
key
- - the meta data key
-
setMetaDataMap
public void setMetaDataMap(Map<?,?> metaDataMap)
- Specified by:
setMetaDataMap
in interfaceNodeMetaDataHandler
- Overrides:
setMetaDataMap
in classASTNode
-
-