org.extendj.ast
node type VarDeclStmt

General Info

Production
VarDeclStmt : Stmt ::= Modifiers TypeAccess:Access VariableDecl* SingleDecl:VariableDeclaration*;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.Stmt
              extended by org.extendj.ast.VarDeclStmt
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, org.jastadd.util.PrettyPrintable

Description

Source
Declared in /home/jesper/git/extendj/java4/grammar/Java.ast at line 79

Member Filters

API level:

Aspect:

Constructors

public VarDeclStmt()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public VarDeclStmt(Modifiers p0,
                   Access p1,
                   List<VariableDecl> p2)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 15

Attributes

@ASTNodeAnnotation.Attribute
syn boolean isDAafter(org.extendj.ast.Variable v)
Overrides:isDAafter in class Stmt
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 257
Aspect
DA
@ASTNodeAnnotation.Attribute
syn boolean isDUafter(org.extendj.ast.Variable v)
Overrides:isDUafter in class Stmt
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 781
Aspect
DU
Overrides:variableDeclaration in class Stmt
Source
Declared in /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag at line 205
Aspect
VariableScope
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag at line 279
Aspect
TypeAnalysis
Overrides:canCompleteNormally in class Stmt
Source
Declared in /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag at line 53
Aspect
UnreachableStatements
Source
Declared in /home/jesper/git/extendj/java4/frontend/VariableDeclaration.jrag at line 163
Aspect
VariableDeclarationTransformation
Computes size required for local variables of this statement. NB: only relevant for variable declaration statements.
Overrides:localSize in class Stmt
Returns:
local size for declared variables
Source
Declared in /home/jesper/git/extendj/java4/backend/LocalNum.jrag at line 38
Aspect
LocalNum
@ASTNodeAnnotation.Attribute
syn boolean modifiedInScope(org.extendj.ast.Variable var)
Specified by:modifiedInScope in class Stmt
Source
Declared in /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag at line 84
Aspect
PreciseRethrow

Methods

public void collectErrors()
Description copied from class: ASTNodeThe collectErrors method is refined so that it calls the checkWarnings method on each ASTNode to report unchecked warnings.
Overrides:collectErrors in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/ErrorCheck.jrag at line 250
Aspect
ErrorCheck
public void prettyPrint(org.jastadd.util.PrettyPrinter out)
Specified by:prettyPrint in interface org.jastadd.util.PrettyPrintableOverrides:prettyPrint in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/PrettyPrint.jadd at line 165
Aspect
Java4PrettyPrint
public void createBCode(org.extendj.ast.CodeGeneration gen)
Overrides:createBCode in class Stmt
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 269
Aspect
CreateBCode
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 23
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 29
public void flushAttrCache()
Overrides:flushAttrCache in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 35
public void flushCollectionCache()
Overrides:flushCollectionCache in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 46
public void flushRewriteCache()
Overrides:flushRewriteCache in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 52
public VarDeclStmt clone()
                  throws java.lang.CloneNotSupportedException
Overrides:clone in class Stmt
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 58
public VarDeclStmt copy()
Overrides:copy in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 65
@Deprecated
public VarDeclStmt fullCopy()
Deprecated. Please use treeCopy or treeCopyNoTransform instead

Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.

Specified by:fullCopy in class Stmt
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 84
public VarDeclStmt treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Specified by:treeCopyNoTransform in class Stmt
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 94
public VarDeclStmt treeCopy()
Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
Specified by:treeCopy in class Stmt
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 119
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 126
public void setModifiers(Modifiers node)
Replaces the Modifiers child.
Parameters:
node - The new node to replace the Modifiers child.
Retrieves the Modifiers child.
Returns:
The current node used as the Modifiers child.
Retrieves the Modifiers child.

This method does not invoke AST transformations.

Returns:
The current node used as the Modifiers child.
public void setTypeAccess(Access node)
Replaces the TypeAccess child.
Parameters:
node - The new node to replace the TypeAccess child.
Retrieves the TypeAccess child.
Returns:
The current node used as the TypeAccess child.
Retrieves the TypeAccess child.

This method does not invoke AST transformations.

Returns:
The current node used as the TypeAccess child.
Replaces the VariableDecl list.
Parameters:
list - The new list node to be used as the VariableDecl list.
public int getNumVariableDecl()
Retrieves the number of children in the VariableDecl list.
Returns:
Number of children in the VariableDecl list.
Retrieves the number of children in the VariableDecl list. Calling this method will not trigger rewrites.
Returns:
Number of children in the VariableDecl list.
Retrieves the element at index i in the VariableDecl list.
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the VariableDecl list.
public boolean hasVariableDecl()
Check whether the VariableDecl list has any children.
Returns:
true if it has at least one child, false otherwise.
public void addVariableDecl(VariableDecl node)
Append an element to the VariableDecl list.
Parameters:
node - The element to append to the VariableDecl list.
public void setVariableDecl(VariableDecl node,
                            int i)
Replaces the VariableDecl 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 VariableDecl list.
Returns:
The node representing the VariableDecl list.
Retrieves the VariableDecl list.

This method does not invoke AST transformations.

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

This method does not invoke AST transformations.

Returns:
The node representing the VariableDecl list.
public int getNumSingleDecl()
Retrieves the number of children in the SingleDecl list.
Returns:
Number of children in the SingleDecl list.
Retrieves the number of children in the SingleDecl list. Calling this method will not trigger rewrites.
Returns:
Number of children in the SingleDecl list.
Retrieves the element at index i in the SingleDecl list.
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the SingleDecl list.
public boolean hasSingleDecl()
Check whether the SingleDecl list has any children.
Returns:
true if it has at least one child, false otherwise.
Append an element to the SingleDecl list.
Parameters:
node - The element to append to the SingleDecl list.
public void setSingleDecl(VariableDeclaration node,
                          int i)
Replaces the SingleDecl 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 child position of the SingleDecl list.
Returns:
The the child position of the SingleDecl list.
Retrieves the SingleDecl list.

This method does not invoke AST transformations.

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

This method does not invoke AST transformations.

Returns:
The node representing the SingleDecl list.
public boolean Define_isIncOrDec(ASTNode caller,
                                 ASTNode child)
Overrides:Define_isIncOrDec in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 71
protected boolean canDefine_isIncOrDec(ASTNode caller,
                                       ASTNode child)
public boolean Define_isDAbefore(ASTNode caller,
                                 ASTNode child,
                                 org.extendj.ast.Variable v)
Overrides:Define_isDAbefore in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 255
protected boolean canDefine_isDAbefore(ASTNode caller,
                                       ASTNode child,
                                       org.extendj.ast.Variable v)
public boolean Define_isDUbefore(ASTNode caller,
                                 ASTNode child,
                                 org.extendj.ast.Variable v)
Overrides:Define_isDUbefore in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 779
protected boolean canDefine_isDUbefore(ASTNode caller,
                                       ASTNode child,
                                       org.extendj.ast.Variable v)
public org.extendj.ast.SimpleSet Define_lookupVariable(ASTNode caller,
                                                       ASTNode child,
                                                       java.lang.String name)
Overrides:Define_lookupVariable in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/LookupVariable.jrag at line 30
protected boolean canDefine_lookupVariable(ASTNode caller,
                                           ASTNode child,
                                           java.lang.String name)
public org.extendj.ast.NameType Define_nameType(ASTNode caller,
                                                ASTNode child)
Overrides:Define_nameType in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag at line 36
protected boolean canDefine_nameType(ASTNode caller,
                                     ASTNode child)
public TypeDecl Define_declType(ASTNode caller,
                                ASTNode child)
Overrides:Define_declType in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java5/frontend/Annotations.jrag at line 601
protected boolean canDefine_declType(ASTNode caller,
                                     ASTNode child)
public int Define_localNum(ASTNode caller,
                           ASTNode child)
Overrides:Define_localNum in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java7/backend/MultiCatch.jrag at line 64
protected boolean canDefine_localNum(ASTNode caller,
                                     ASTNode child)
Overrides:rewriteTo in class Stmt

Fields

protected java.util.Map isDAafter_Variable_values
protected java.util.Map isDUafter_Variable_values
protected boolean canCompleteNormally_value
protected boolean getSingleDeclList_computed
protected boolean localSize_computed
protected int localSize_value

Inherited Members

Attributes inherited from org.extendj.ast.Stmt

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.Stmt

Methods inherited from class org.extendj.ast.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from org.extendj.ast.Stmt

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value