AST
node type ASTNode<T extends ASTNode>

General Info

Production
ASTNode;
Type Hierarchy:
java.lang.Object
  extended by AST.ASTNode<T>
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<T>
Direct Known Subclasses:
Block, BlockStmt, Exp, List, Opt, Program

Description

Member Filters

API level:

Aspect:

Constructors

public ASTNode()

Methods

public ASTNode<T> clone()
                                 throws java.lang.CloneNotSupportedException
Overrides:clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException
public ASTNode<T> copy()
public ASTNode<T> fullCopy()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Returns:
dangling copy of the subtree at this node
public void collectErrors(java.util.Collection c)
Source
Declared in ../spec/ErrorCheck.jadd at line 12
Aspect
ErrorCheck
protected void error(java.util.Collection c,
                     java.lang.String s)
Source
Declared in ../spec/ErrorCheck.jadd at line 18
Aspect
ErrorCheck
public java.lang.String printAST()
Print AST
Source
Declared in ../spec/PrettyPrint.jadd at line 5
Aspect
PrettyPrint
public void printAST(java.lang.StringBuilder sb)
Source
Declared in ../spec/PrettyPrint.jadd at line 10
Aspect
PrettyPrint
public void printAST(java.lang.StringBuilder sb,
                     int t)
Source
Declared in ../spec/PrettyPrint.jadd at line 13
Aspect
PrettyPrint
public java.lang.String getIndent(int t)
Source
Declared in ../spec/PrettyPrint.jadd at line 78
Aspect
PrettyPrint
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
public int getIndexOfChild(ASTNode node)
public final ASTNode$State state()
public boolean in$Circle()
public void in$Circle(boolean b)
public boolean is$Final()
public void is$Final(boolean b)
public T getChild(int i)
public void addChild(T node)
public final T getChildNoTransform(int i)

This method does not invoke AST transformations.

protected int numChildren()
public int getNumChild()
public final int getNumChildNoTransform()

This method does not invoke AST transformations.

public void setChild(ASTNode node,
                     int i)
public void insertChild(ASTNode node,
                        int i)
public void removeChild(int i)
public void setParent(ASTNode node)
public int getStartLine()
public short getStartColumn()
public int getEndLine()
public short getEndColumn()
public void setStart(int startLine,
                     short startColumn)
public void setEnd(int endLine,
                   short endColumn)
protected boolean duringTypeAnalysis()
public java.util.Iterator<T> iterator()
Specified by:iterator in interface java.lang.Iterable<T extends ASTNode>
public boolean mayHaveRewrite()
public void flushCache()
public void flushCollectionCache()
public boolean Define_boolean_isQualified(ASTNode caller,
                                          ASTNode child)
public Decl Define_Decl_lookup(ASTNode caller,
                               ASTNode child,
                               java.lang.String name)
public Decl Define_Decl_lookupMethod(ASTNode caller,
                                     ASTNode child,
                                     java.lang.String name,
                                     List argList)

Fields

public static final boolean generatedWithCircularEnabled
public static final boolean generatedWithCacheCycle
public static final boolean generatedWithComponentCheck
protected ASTNode parent
Parent pointer
protected ASTNode[] children
Child array
protected static ASTNode$State state
public boolean in$Circle
public boolean is$Final
protected int numChildren
protected int startLine
Line and column information.
protected short startColumn
protected int endLine
protected short endColumn

Inherited Members

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
toString
wait
wait
wait