org.extendj.ast
node type AnnotatedCompilationUnit

General Info

Production
AnnotatedCompilationUnit : CompilationUnit ::= Modifiers;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.CompilationUnit
              extended by org.extendj.ast.AnnotatedCompilationUnit
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, org.jastadd.util.PrettyPrintable

Description

Source
Declared in /home/jesper/git/extendj/java5/grammar/Annotations.ast at line 16

Member Filters

API level:

Aspect:

Constructors

public AnnotatedCompilationUnit()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public AnnotatedCompilationUnit(java.lang.String p0,
                                List<ImportDecl> p1,
                                List<TypeDecl> p2,
                                Modifiers p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 15
public AnnotatedCompilationUnit(beaver.Symbol p0,
                                List<ImportDecl> p1,
                                List<TypeDecl> p2,
                                Modifiers p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 21

Methods

public void nameCheck()
Overrides:nameCheck in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/java5/frontend/Annotations.jrag at line 42
Aspect
Annotations
public void prettyPrint(org.jastadd.util.PrettyPrinter out)
Specified by:prettyPrint in interface org.jastadd.util.PrettyPrintableOverrides:prettyPrint in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/java5/frontend/Annotations.jrag at line 658
Aspect
AnnotationPrettyPrinting
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 30
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 36
public void flushAttrCache()
Overrides:flushAttrCache in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 42
public void flushCollectionCache()
Overrides:flushCollectionCache in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 48
public void flushRewriteCache()
Overrides:flushRewriteCache in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 54
public AnnotatedCompilationUnit clone()
                               throws java.lang.CloneNotSupportedException
Overrides:clone in class CompilationUnit
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 60
Overrides:copy in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 67
@Deprecated
public AnnotatedCompilationUnit 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.

Overrides:fullCopy in class CompilationUnit
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 86
public AnnotatedCompilationUnit treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:treeCopyNoTransform in class CompilationUnit
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 96
public AnnotatedCompilationUnit 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.
Overrides:treeCopy in class CompilationUnit
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 116
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/ASTNode at line 123
public void setPackageDecl(java.lang.String value)
Replaces the lexeme PackageDecl.
Overrides:setPackageDecl in class CompilationUnit
Parameters:
value - The new value for the lexeme PackageDecl.
public void setPackageDecl(beaver.Symbol symbol)
JastAdd-internal setter for lexeme PackageDecl using the Beaver parser.
Overrides:setPackageDecl in class CompilationUnit
Parameters:
symbol - Symbol containing the new value for the lexeme PackageDecl
@ASTNodeAnnotation.Token(name="PackageDecl")
public java.lang.String getPackageDecl()
Retrieves the value for the lexeme PackageDecl.
Overrides:getPackageDecl in class CompilationUnit
Returns:
The value for the lexeme PackageDecl.
public void setImportDeclList(List<ImportDecl> list)
Replaces the ImportDecl list.
Overrides:setImportDeclList in class CompilationUnit
Parameters:
list - The new list node to be used as the ImportDecl list.
public int getNumImportDecl()
Retrieves the number of children in the ImportDecl list.
Overrides:getNumImportDecl in class CompilationUnit
Returns:
Number of children in the ImportDecl list.
Retrieves the number of children in the ImportDecl list. Calling this method will not trigger rewrites.
Overrides:getNumImportDeclNoTransform in class CompilationUnit
Returns:
Number of children in the ImportDecl list.
public ImportDecl getImportDecl(int i)
Retrieves the element at index i in the ImportDecl list.
Overrides:getImportDecl in class CompilationUnit
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the ImportDecl list.
public boolean hasImportDecl()
Check whether the ImportDecl list has any children.
Overrides:hasImportDecl in class CompilationUnit
Returns:
true if it has at least one child, false otherwise.
public void addImportDecl(ImportDecl node)
Append an element to the ImportDecl list.
Overrides:addImportDecl in class CompilationUnit
Parameters:
node - The element to append to the ImportDecl list.
public void setImportDecl(ImportDecl node,
                          int i)
Replaces the ImportDecl list element at index i with the new node node.
Overrides:setImportDecl in class CompilationUnit
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the ImportDecl list.
Overrides:getImportDeclList in class CompilationUnit
Returns:
The node representing the ImportDecl list.
Retrieves the ImportDecl list.

This method does not invoke AST transformations.

Overrides:getImportDeclListNoTransform in class CompilationUnit
Returns:
The node representing the ImportDecl list.
Retrieves the ImportDecl list.
Overrides:getImportDecls in class CompilationUnit
Returns:
The node representing the ImportDecl list.
Retrieves the ImportDecl list.

This method does not invoke AST transformations.

Overrides:getImportDeclsNoTransform in class CompilationUnit
Returns:
The node representing the ImportDecl list.
public void setTypeDeclList(List<TypeDecl> list)
Replaces the TypeDecl list.
Overrides:setTypeDeclList in class CompilationUnit
Parameters:
list - The new list node to be used as the TypeDecl list.
public int getNumTypeDecl()
Retrieves the number of children in the TypeDecl list.
Overrides:getNumTypeDecl in class CompilationUnit
Returns:
Number of children in the TypeDecl list.
Retrieves the number of children in the TypeDecl list. Calling this method will not trigger rewrites.
Overrides:getNumTypeDeclNoTransform in class CompilationUnit
Returns:
Number of children in the TypeDecl list.
public TypeDecl getTypeDecl(int i)
Retrieves the element at index i in the TypeDecl list.
Overrides:getTypeDecl in class CompilationUnit
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the TypeDecl list.
public boolean hasTypeDecl()
Check whether the TypeDecl list has any children.
Overrides:hasTypeDecl in class CompilationUnit
Returns:
true if it has at least one child, false otherwise.
public void addTypeDecl(TypeDecl node)
Append an element to the TypeDecl list.
Overrides:addTypeDecl in class CompilationUnit
Parameters:
node - The element to append to the TypeDecl list.
public void setTypeDecl(TypeDecl node,
                        int i)
Replaces the TypeDecl list element at index i with the new node node.
Overrides:setTypeDecl in class CompilationUnit
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the TypeDecl list.
Overrides:getTypeDeclList in class CompilationUnit
Returns:
The node representing the TypeDecl list.
Retrieves the TypeDecl list.

This method does not invoke AST transformations.

Overrides:getTypeDeclListNoTransform in class CompilationUnit
Returns:
The node representing the TypeDecl list.
Retrieves the TypeDecl list.
Overrides:getTypeDecls in class CompilationUnit
Returns:
The node representing the TypeDecl list.
Retrieves the TypeDecl list.

This method does not invoke AST transformations.

Overrides:getTypeDeclsNoTransform in class CompilationUnit
Returns:
The node representing the TypeDecl list.
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 boolean Define_mayUseAnnotationTarget(ASTNode caller,
                                             ASTNode child,
                                             java.lang.String name)
Overrides:Define_mayUseAnnotationTarget in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java5/frontend/Annotations.jrag at line 96
protected boolean canDefine_mayUseAnnotationTarget(ASTNode caller,
                                                   ASTNode child,
                                                   java.lang.String name)
public java.lang.String Define_hostPackage(ASTNode caller,
                                           ASTNode child)
Overrides:Define_hostPackage in class CompilationUnit
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag at line 622
protected boolean canDefine_hostPackage(ASTNode caller,
                                        ASTNode child)
Overrides:rewriteTo in class CompilationUnit

Inherited Members

Attributes inherited from org.extendj.ast.CompilationUnit

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.CompilationUnit

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.CompilationUnit

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value