AST
node type WhileStmt

General Info

Production
WhileStmt : Stmt ::= Condition:Exp Body:Stmt;
Type Hierarchy:
java.lang.Object
  extended by AST.ASTNode<ASTNode>
      extended by AST.BlockStmt
          extended by AST.Stmt
              extended by AST.WhileStmt
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Source
Declared in spec/picojava.ast at line 11

Member Filters

API level:

Aspect:

Constructors

public WhileStmt()
public WhileStmt(Exp p0,
                 Stmt p1)

Attributes

Source
Declared in spec/PredefinedTypes.jrag at line 14
Aspect
PredefinedTypes

Methods

public WhileStmt clone()
                throws java.lang.CloneNotSupportedException
Overrides:clone in class Stmt
Throws:
java.lang.CloneNotSupportedException
public WhileStmt copy()
Overrides:copy in class ASTNode<ASTNode>
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public void collectErrors(java.util.Collection c)
Overrides:collectErrors in class ASTNode<ASTNode>
Source
Declared in spec/ErrorCheck.jadd at line 39
Aspect
ErrorCheck
public void prettyPrint(java.lang.StringBuilder sb,
                        int t)
Source
Declared in spec/PrettyPrint.jadd at line 56
Aspect
PrettyPrint
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Stmt
protected int numChildren()
Overrides:numChildren in class Stmt
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Stmt
public void flushCache()
Overrides:flushCache in class Stmt
public void flushCollectionCache()
Overrides:flushCollectionCache in class Stmt
public void setCondition(Exp node)
Replaces the Condition child.
Parameters:
node - The new node to replace the Condition child.
public Exp getCondition()
Retrieves the Condition child.
Returns:
The current node used as the Condition child.
Retrieves the Condition child.

This method does not invoke AST transformations.

Returns:
The current node used as the Condition child.
public void setBody(Stmt node)
Replaces the Body child.
Parameters:
node - The new node to replace the Body child.
public Stmt getBody()
Retrieves the Body child.
Returns:
The current node used as the Body child.
Retrieves the Body child.

This method does not invoke AST transformations.

Returns:
The current node used as the Body child.
Overrides:rewriteTo in class Stmt

Fields

protected int booleanType_visited

Inherited Members