AST
node type ResourceModifiers

General Info

Production
ResourceModifiers : Modifiers;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Modifiers
              extended by AST.ResourceModifiers
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Subclass of Modifiers for resource declarations. This subclass is added as a convenient method of making resource declarations implicitly final.
Source
Declared in Java7Frontend/TryWithResources.ast at line 16

Member Filters

API level:

Aspect:

Constructors

Attributes

syn boolean isFinal()
Overrides:isFinal in class Modifiers
Source
Declared in Java7Frontend/TryWithResources.jrag at line 237
Aspect
TryWithResources

Methods

public void flushCache()
Overrides:flushCache in class Modifiers
public void flushCollectionCache()
Overrides:flushCollectionCache in class Modifiers
public ResourceModifiers clone()
                        throws java.lang.CloneNotSupportedException
Overrides:clone in class Modifiers
Throws:
java.lang.CloneNotSupportedException
Overrides:copy in class Modifiers
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class Modifiers
Returns:
dangling copy of the subtree at this node
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Modifiers
protected int numChildren()
Overrides:numChildren in class Modifiers
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Modifiers
public void setModifierList(List<Modifier> list)
Replaces the Modifier list.
Overrides:setModifierList in class Modifiers
Parameters:
list - The new list node to be used as the Modifier list.
public int getNumModifier()
Retrieves the number of children in the Modifier list.
Overrides:getNumModifier in class Modifiers
Returns:
Number of children in the Modifier list.
Retrieves the number of children in the Modifier list. Calling this method will not trigger rewrites..
Overrides:getNumModifierNoTransform in class Modifiers
Returns:
Number of children in the Modifier list.
public Modifier getModifier(int i)
Retrieves the element at index i in the Modifier list..
Overrides:getModifier in class Modifiers
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the Modifier list.
public void addModifier(Modifier node)
Append an element to the Modifier list.
Overrides:addModifier in class Modifiers
Parameters:
node - The element to append to the Modifier list.
public void addModifierNoTransform(Modifier node)
Overrides:addModifierNoTransform in class Modifiers
public void setModifier(Modifier node,
                        int i)
Replaces the Modifier list element at index i with the new node node.
Overrides:setModifier in class Modifiers
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the Modifier list.
Overrides:getModifiers in class Modifiers
Returns:
The node representing the Modifier list.
Retrieves the Modifier list.

This method does not invoke AST transformations.

Overrides:getModifiersNoTransform in class Modifiers
Returns:
The node representing the Modifier list.
Retrieves the Modifier list.
Overrides:getModifierList in class Modifiers
Returns:
The node representing the Modifier list.
Retrieves the Modifier list.

This method does not invoke AST transformations.

Overrides:getModifierListNoTransform in class Modifiers
Returns:
The node representing the Modifier list.
Overrides:rewriteTo in class Modifiers

Fields

protected boolean isFinal_computed
protected boolean isFinal_value

Inherited Members

Attributes inherited from AST.Modifiers

Attributes inherited from AST.ASTNode

Methods inherited from class AST.Modifiers

Methods inherited from class 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 AST.Modifiers

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value