public final class EmptyStatement extends java.lang.Object implements StatementWithoutTrailingSubstatement
EmptyStatement
denotes the nonterminal symbol EmptyStatement, as defined by the Java Language Specification.
This class is immutable and therefore suitable for concurrent use without external synchronization.
Modifier and Type | Method and Description |
---|---|
boolean |
accept(org.macroing.cit.java.util.node.NodeHierarchicalVisitor nodeHierarchicalVisitor)
Accepts a
NodeHierarchicalVisitor . |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of EmptyStatement , and that EmptyStatement instance is equal to this EmptyStatement instance, false otherwise. |
static EmptyStatement |
getInstance()
Returns the one and only
EmptyStatement instance. |
int |
hashCode()
Returns a hash code for this
EmptyStatement instance. |
boolean |
isIterationStatement()
Returns
true if, and only if, this Statement is an iteration statement, false otherwise. |
java.lang.String |
toString()
Returns a
String representation of this EmptyStatement instance. |
public boolean accept(org.macroing.cit.java.util.node.NodeHierarchicalVisitor nodeHierarchicalVisitor)
NodeHierarchicalVisitor
.
Returns the result of nodeHierarchicalVisitor.visitLeave(this)
.
If nodeHierarchicalVisitor
is null
, a NullPointerException
will be thrown.
If a RuntimeException
is thrown by the current NodeHierarchicalVisitor
, a NodeTraversalException
will be thrown with the RuntimeException
wrapped.
This implementation will:
NullPointerException
if nodeHierarchicalVisitor
is null
.NodeTraversalException
if nodeHierarchicalVisitor
throws a RuntimeException
.Node
s, if it has any.accept
in interface org.macroing.cit.java.util.node.Node
nodeHierarchicalVisitor
- the NodeHierarchicalVisitor
to acceptnodeHierarchicalVisitor.visitLeave(this)
org.macroing.cit.java.util.node.NodeTraversalException
- thrown if, and only if, a RuntimeException
is thrown by the current NodeHierarchicalVisitor
java.lang.NullPointerException
- thrown if, and only if, nodeHierarchicalVisitor
is null
public boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of EmptyStatement
, and that EmptyStatement
instance is equal to this EmptyStatement
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this EmptyStatement
instance for equalitytrue
if, and only if, object
is an instance of EmptyStatement
, and that EmptyStatement
instance is equal to this EmptyStatement
instance, false
otherwisepublic boolean isIterationStatement()
true
if, and only if, this Statement
is an iteration statement, false
otherwise.
This implementation returns false
, as a EmptyStatement
is not an iteration statement.
isIterationStatement
in interface Statement
isIterationStatement
in interface StatementNoShortIf
true
if, and only if, this Statement
is an iteration statement, false
otherwisepublic int hashCode()
EmptyStatement
instance.hashCode
in class java.lang.Object
EmptyStatement
instancepublic java.lang.String toString()
String
representation of this EmptyStatement
instance.toString
in class java.lang.Object
String
representation of this EmptyStatement
instancepublic static EmptyStatement getInstance()
EmptyStatement
instance.EmptyStatement
instance