org.extendj.ast
node type ResourceDeclaration

General Info

Production
ResourceDeclaration : VariableDeclaration;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.VariableDeclaration
              extended by org.extendj.ast.ResourceDeclaration
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, java.util.Iterator, org.jastadd.util.PrettyPrintable
static class SimpleSet.SimpleSetImpl
           

Description

A resource declaration in a try with resources statement.
Source
Declared in /home/jesper/git/extendj/java7/grammar/TryWithResources.ast at line 9

Member Filters

API level:

Aspect:

Constructors

public ResourceDeclaration()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public ResourceDeclaration(Modifiers p0,
                           Access p1,
                           java.lang.String p2,
                           Opt<Expr> p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 14
public ResourceDeclaration(Modifiers p0,
                           Access p1,
                           beaver.Symbol p2,
                           Opt<Expr> p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 20

Attributes

@ASTNodeAnnotation.Attribute
inh TypeDecl lookupType(java.lang.String packageName,
                                                java.lang.String typeName)
Inherit the lookupType attribute in ResourceDeclaration.
Source
Declared in /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag at line 40
Aspect
TryWithResources

Methods

public void typeCheck()
Type checking for TWR.
Overrides:typeCheck in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag at line 45
Aspect
TryWithResources
public void nameCheck()
Overrides:nameCheck in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/java7/frontend/TryWithResources.jrag at line 195
Aspect
TryWithResources
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 29
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 35
public void flushAttrCache()
Overrides:flushAttrCache in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 41
public void flushCollectionCache()
Overrides:flushCollectionCache in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 47
public void flushRewriteCache()
Overrides:flushRewriteCache in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 53
public ResourceDeclaration clone()
                          throws java.lang.CloneNotSupportedException
Overrides:clone in class VariableDeclaration
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 59
public ResourceDeclaration copy()
Overrides:copy in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 66
@Deprecated
public ResourceDeclaration 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 VariableDeclaration
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 85
public ResourceDeclaration 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 VariableDeclaration
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 95
public ResourceDeclaration 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 VariableDeclaration
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 115
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 122
public void setModifiers(Modifiers node)
Replaces the Modifiers child.
Overrides:setModifiers in class VariableDeclaration
Parameters:
node - The new node to replace the Modifiers child.
Retrieves the Modifiers child.
Overrides:getModifiers in class VariableDeclaration
Returns:
The current node used as the Modifiers child.
Retrieves the Modifiers child.

This method does not invoke AST transformations.

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

This method does not invoke AST transformations.

Overrides:getTypeAccessNoTransform in class VariableDeclaration
Returns:
The current node used as the TypeAccess child.
public void setID(java.lang.String value)
Replaces the lexeme ID.
Overrides:setID in class VariableDeclaration
Parameters:
value - The new value for the lexeme ID.
public void setID(beaver.Symbol symbol)
JastAdd-internal setter for lexeme ID using the Beaver parser.
Overrides:setID in class VariableDeclaration
Parameters:
symbol - Symbol containing the new value for the lexeme ID
@ASTNodeAnnotation.Token(name="ID")
public java.lang.String getID()
Retrieves the value for the lexeme ID.
Overrides:getID in class VariableDeclaration
Returns:
The value for the lexeme ID.
public void setInitOpt(Opt<Expr> opt)
Replaces the optional node for the Init child. This is the Opt node containing the child Init, not the actual child!
Overrides:setInitOpt in class VariableDeclaration
Parameters:
opt - The new node to be used as the optional node for the Init child.
public void setInit(Expr node)
Replaces the (optional) Init child.
Overrides:setInit in class VariableDeclaration
Parameters:
node - The new node to be used as the Init child.
public boolean hasInit()
Check whether the optional Init child exists.
Overrides:hasInit in class VariableDeclaration
Returns:
true if the optional Init child exists, false if it does not.
public Expr getInit()
Retrieves the (optional) Init child.
Overrides:getInit in class VariableDeclaration
Returns:
The Init child, if it exists. Returns null otherwise.
Retrieves the optional node for the Init child. This is the Opt node containing the child Init, not the actual child!
Overrides:getInitOpt in class VariableDeclaration
Returns:
The optional node for child the Init child.
Retrieves the optional node for child Init. This is the Opt node containing the child Init, not the actual child!

This method does not invoke AST transformations.

Overrides:getInitOptNoTransform in class VariableDeclaration
Returns:
The optional node for child Init.
public org.extendj.ast.NameType Define_nameType(ASTNode caller,
                                                ASTNode child)
Overrides:Define_nameType in class VariableDeclaration
Source
Declared in /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag at line 36
protected boolean canDefine_nameType(ASTNode caller,
                                     ASTNode child)
Overrides:rewriteTo in class VariableDeclaration
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.lang.String name()
public TypeDecl type()
public java.util.Collection<TypeDecl> throwTypes()
public boolean isParameter()
public boolean isClassVariable()
public boolean isInstanceVariable()
public boolean isMethodParameter()
public boolean isConstructorParameter()
public boolean isLocalVariable()
public boolean isFinal()
public boolean isVolatile()
public boolean isEffectivelyFinal()
public boolean isBlank()
public boolean isStatic()
public boolean isSynthetic()
public org.extendj.ast.Constant constant()

Fields

public static final org.extendj.ast.SimpleSet emptySet
public static final org.extendj.ast.SimpleSet fullSet

Inherited Members

Attributes inherited from org.extendj.ast.VariableDeclaration

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.VariableDeclaration

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

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value