AST
node type Block

General Info

Production
Block : ASTNode ::= BlockStmt*;
Type Hierarchy:
java.lang.Object
  extended by AST.ASTNode<ASTNode>
      extended by AST.Block
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Source
Declared in spec/picojava.ast at line 3

Member Filters

API level:

Aspect:

Constructors

public Block()
public Block(List<BlockStmt> p0)

Attributes

syn Decl localLookup(java.lang.String name)
Source
Declared in spec/NameResolution.jrag at line 84
Aspect
NameResolution
inh Decl lookup(java.lang.String name)
Source
Declared in spec/NameResolution.jrag at line 79
Aspect
NameResolution
Source
Declared in spec/NullObjects.jrag at line 21
Aspect
NullObjects

Methods

public Block clone()
            throws java.lang.CloneNotSupportedException
Overrides:clone in class ASTNode<ASTNode>
Throws:
java.lang.CloneNotSupportedException
public Block copy()
Overrides:copy in class ASTNode<ASTNode>
public Block fullCopy()
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 prettyPrint(java.lang.StringBuilder sb,
                        int t)
Source
Declared in spec/PrettyPrint.jadd at line 31
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 ASTNode<ASTNode>
protected int numChildren()
Overrides:numChildren in class ASTNode<ASTNode>
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class ASTNode<ASTNode>
public void flushCache()
Overrides:flushCache in class ASTNode<ASTNode>
public void flushCollectionCache()
Overrides:flushCollectionCache in class ASTNode<ASTNode>
public void setBlockStmtList(List<BlockStmt> list)
Replaces the BlockStmt list.
Parameters:
list - The new list node to be used as the BlockStmt list.
public int getNumBlockStmt()
Retrieves the number of children in the BlockStmt list.
Returns:
Number of children in the BlockStmt list.
Retrieves the number of children in the BlockStmt list. Calling this method will not trigger rewrites.
Returns:
Number of children in the BlockStmt list.
public BlockStmt getBlockStmt(int i)
Retrieves the element at index i in the BlockStmt list.
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the BlockStmt list.
public boolean hasBlockStmt()
Check whether the BlockStmt list has any children.
Returns:
true if it has at least one child, false otherwise.
public void addBlockStmt(BlockStmt node)
Append an element to the BlockStmt list.
Parameters:
node - The element to append to the BlockStmt list.
public void setBlockStmt(BlockStmt node,
                         int i)
Replaces the BlockStmt list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the BlockStmt list.
Returns:
The node representing the BlockStmt list.
Retrieves the BlockStmt list.

This method does not invoke AST transformations.

Returns:
The node representing the BlockStmt list.
Retrieves the BlockStmt list.
Returns:
The node representing the BlockStmt list.
Retrieves the BlockStmt list.

This method does not invoke AST transformations.

Returns:
The node representing the BlockStmt list.
public Decl Define_Decl_lookup(ASTNode caller,
                               ASTNode child,
                               java.lang.String name)
Overrides:Define_Decl_lookup in class ASTNode<ASTNode>
Source
Declared in spec/NameResolution.jrag at line 23
Overrides:rewriteTo in class ASTNode<ASTNode>

Fields

protected java.util.Map localLookup_String_visited
protected java.util.Map localLookup_String_values
protected java.util.Map lookup_String_visited
protected int unknownDecl_visited

Inherited Members