org.extendj.ast
node type ReturnStmt

General Info

Production
ReturnStmt : Stmt ::= [Result:Expr] [Finally:Block];
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.ReturnStmt
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 210

Member Filters

API level:

Aspect:

Constructors

public ReturnStmt(Expr expr)
 
Source
Declared in /home/jesper/git/extendj/java4/frontend/NodeConstructors.jrag at line 73
Aspect
NodeConstructors
public ReturnStmt()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public ReturnStmt(Opt<Expr> p0)
 
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 isDUafterReachedFinallyBlocks(org.extendj.ast.Variable v)
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 1084
Aspect
DU
@ASTNodeAnnotation.Attribute
syn boolean isDAafterReachedFinallyBlocks(org.extendj.ast.Variable v)
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 1131
Aspect
DU
@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
Source
Declared in /home/jesper/git/extendj/java4/frontend/NTAFinally.jrag at line 61
Aspect
NTAFinally
Overrides:canCompleteNormally in class Stmt
Source
Declared in /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag at line 53
Aspect
UnreachableStatements
Overrides:sourceLineNumber in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/backend/CodeGeneration.jrag at line 37
Aspect
CodeGeneration
@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
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag at line 472
Aspect
TypeCheck
Source
Declared in /home/jesper/git/extendj/java4/backend/LocalNum.jrag at line 101
Aspect
LocalNum
Source
Declared in /home/jesper/git/extendj/java8/frontend/EnclosingLambda.jrag at line 33
Aspect
EnclosingLambda

Methods

public void collectBranches(java.util.Collection<Stmt> c)
Overrides:collectBranches in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/BranchTarget.jrag at line 104
Aspect
BranchTarget
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 219
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 1669
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 21
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 27
public void flushAttrCache()
Overrides:flushAttrCache in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 33
public void flushCollectionCache()
Overrides:flushCollectionCache in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 47
public void flushRewriteCache()
Overrides:flushRewriteCache in class Stmt
Source
Declared in /home/jesper/git/extendj/ASTNode at line 53
public ReturnStmt clone()
                 throws java.lang.CloneNotSupportedException
Overrides:clone in class Stmt
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 59
public ReturnStmt copy()
Overrides:copy in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 66
@Deprecated
public ReturnStmt 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 85
public ReturnStmt 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 95
public ReturnStmt 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 120
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 127
public void setResultOpt(Opt<Expr> opt)
Replaces the optional node for the Result child. This is the Opt node containing the child Result, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the Result child.
public void setResult(Expr node)
Replaces the (optional) Result child.
Parameters:
node - The new node to be used as the Result child.
public boolean hasResult()
Check whether the optional Result child exists.
Returns:
true if the optional Result child exists, false if it does not.
public Expr getResult()
Retrieves the (optional) Result child.
Returns:
The Result child, if it exists. Returns null otherwise.
Retrieves the optional node for the Result child. This is the Opt node containing the child Result, not the actual child!
Returns:
The optional node for child the Result child.
Retrieves the optional node for child Result. This is the Opt node containing the child Result, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child Result.
public void setFinally(Block node)
Replaces the (optional) Finally child.
Parameters:
node - The new node to be used as the Finally child.
public boolean hasFinally()
Check whether the optional Finally child exists.
Returns:
true if the optional Finally child exists, false if it does not.
public Block getFinally()
Retrieves the (optional) Finally child.
Returns:
The Finally child, if it exists. Returns null otherwise.
Retrieves the optional node for child Finally. This is the Opt node containing the child Finally, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child Finally.
Retrieves the child position of the optional child Finally.
Returns:
The the child position of the optional child Finally.
public void typeCheck()
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TypeCheck.jrag at line 196
Aspect
TypeCheck
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)
Overrides:Define_assignConvertedType in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag at line 58
protected boolean canDefine_assignConvertedType(ASTNode caller,
                                                ASTNode child)
public TypeDecl Define_targetType(ASTNode caller,
                                  ASTNode child)
Overrides:Define_targetType in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 30
protected boolean canDefine_targetType(ASTNode caller,
                                       ASTNode child)
public boolean Define_assignmentContext(ASTNode caller,
                                        ASTNode child)
Overrides:Define_assignmentContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 196
protected boolean canDefine_assignmentContext(ASTNode caller,
                                              ASTNode child)
public boolean Define_invocationContext(ASTNode caller,
                                        ASTNode child)
Overrides:Define_invocationContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 197
protected boolean canDefine_invocationContext(ASTNode caller,
                                              ASTNode child)
public boolean Define_castContext(ASTNode caller,
                                  ASTNode child)
Overrides:Define_castContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 198
protected boolean canDefine_castContext(ASTNode caller,
                                        ASTNode child)
public boolean Define_stringContext(ASTNode caller,
                                    ASTNode child)
Overrides:Define_stringContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 199
protected boolean canDefine_stringContext(ASTNode caller,
                                          ASTNode child)
public boolean Define_numericContext(ASTNode caller,
                                     ASTNode child)
Overrides:Define_numericContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 200
protected boolean canDefine_numericContext(ASTNode caller,
                                           ASTNode child)
Overrides:rewriteTo in class Stmt
protected void contributeTo_BlockLambdaBody_BlockLambdaBody_lambdaReturns(java.util.ArrayList<ReturnStmt> collection)

Fields

protected java.util.Map isDAafter_Variable_values
protected java.util.Map isDUafter_Variable_values
protected boolean getFinallyOpt_computed
protected boolean canCompleteNormally_value
protected boolean resultSaveLocalNum_computed
protected boolean enclosingLambda_computed

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