AST
node type VarDecl

General Info

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

Description

Source
Declared in spec/picojava.ast at line 9

Member Filters

API level:

Aspect:

Constructors

public VarDecl()
public VarDecl(java.lang.String p0,
               Access p1)

Attributes

syn TypeDecl type()
Specified by:type in class Decl
Source
Declared in spec/TypeAnalysis.jrag at line 34
Aspect
TypeAnalysis

Methods

public VarDecl clone()
              throws java.lang.CloneNotSupportedException
Overrides:clone in class Decl
Throws:
java.lang.CloneNotSupportedException
public VarDecl copy()
Overrides:copy in class ASTNode<ASTNode>
public VarDecl 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 48
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 Decl
protected int numChildren()
Overrides:numChildren in class Decl
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Decl
public void flushCache()
Overrides:flushCache in class Decl
public void flushCollectionCache()
Overrides:flushCollectionCache in class Decl
public void setName(java.lang.String value)
Replaces the lexeme Name.
Overrides:setName in class Decl
Parameters:
value - The new value for the lexeme Name.
public java.lang.String getName()
Retrieves the value for the lexeme Name.
Overrides:getName in class Decl
Returns:
The value for the lexeme Name.
public void setType(Access node)
Replaces the Type child.
Parameters:
node - The new node to replace the Type child.
public Access getType()
Retrieves the Type child.
Returns:
The current node used as the Type child.
Retrieves the Type child.

This method does not invoke AST transformations.

Returns:
The current node used as the Type child.
Overrides:rewriteTo in class Decl

Fields

protected int type_visited
protected boolean type_computed

Inherited Members