jltools.ext.jl.ast
Class Catch_c

java.lang.Object
  |
  +--jltools.ext.jl.ast.Node_c
        |
        +--jltools.ext.jl.ast.Stmt_c
              |
              +--jltools.ext.jl.ast.Catch_c
All Implemented Interfaces:
Catch, java.lang.Cloneable, Copy, Node, java.io.Serializable, Stmt

public class Catch_c
extends Stmt_c
implements Catch

A Catch represents one half of a try... catch statement. Specifically, the second half.

See Also:
Serialized Form

Inner classes inherited from class jltools.ext.jl.ast.Node_c
Node_c.StringCodeWriter
 
Field Summary
protected  <>Block body
           
protected  Formal formal
           
 
Fields inherited from class jltools.ext.jl.ast.Node_c
ext, position
 
Constructor Summary
Catch_c(Ext ext, Position pos, Formal formal, <>Block body)
           
 
Method Summary
 <>Block body()
          Get the body of the catch block.
 Catch body(<>Block body)
          Set the body of the catch block.
 Type catchType()
          Get the catchType of the catch block.
 void enterScope(Context c)
          Adjust the environment on entering the scope of the method.
 Formal formal()
          Get the formal of the catch block.
 Catch formal(Formal formal)
          Set the formal of the catch block.
 void leaveScope(Context c)
          Adjust the environment on leaving the scope of the method.
protected  Catch_c reconstruct(Formal formal, <>Block body)
          Reconstruct the catch block.
 java.lang.String toString()
           
 void translate_(CodeWriter w, Translator tr)
          Write the catch block to an output file.
 Node typeCheck_(TypeChecker tc)
          Type check the catch block.
 Node visitChildren(NodeVisitor v)
          Visit the children of the catch block.
 
Methods inherited from class jltools.ext.jl.ast.Node_c
buildTypes_, buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, dump, exceptionCheck_, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, position, position, reconstructTypes_, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck, typeCheckOverride_, typeCheckOverride, visit, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jltools.ast.Catch
body
 
Methods inherited from interface jltools.ast.Node
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, position, position, reconstructTypes_, typeCheckOverride_, visit
 

Field Detail

formal

protected Formal formal

body

protected <>Block body
Constructor Detail

Catch_c

public Catch_c(Ext ext,
               Position pos,
               Formal formal,
               <>Block body)
Method Detail

catchType

public Type catchType()
Get the catchType of the catch block.
Specified by:
catchType in interface Catch

formal

public Formal formal()
Get the formal of the catch block.
Specified by:
formal in interface Catch

formal

public Catch formal(Formal formal)
Set the formal of the catch block.
Specified by:
formal in interface Catch

body

public <>Block body()
Get the body of the catch block.
Specified by:
body in interface Catch

body

public Catch body(<>Block body)
Set the body of the catch block.

reconstruct

protected Catch_c reconstruct(Formal formal,
                              <>Block body)
Reconstruct the catch block.

visitChildren

public Node visitChildren(NodeVisitor v)
Visit the children of the catch block.
Specified by:
visitChildren in interface Node
Overrides:
visitChildren in class Node_c

enterScope

public void enterScope(Context c)
Description copied from interface: Node
Adjust the environment on entering the scope of the method.
Specified by:
enterScope in interface Node
Overrides:
enterScope in class Node_c

leaveScope

public void leaveScope(Context c)
Description copied from interface: Node
Adjust the environment on leaving the scope of the method.
Specified by:
leaveScope in interface Node
Overrides:
leaveScope in class Node_c

typeCheck_

public Node typeCheck_(TypeChecker tc)
                throws SemanticException
Type check the catch block.
Specified by:
typeCheck_ in interface Node
Overrides:
typeCheck_ in class Node_c

toString

public java.lang.String toString()
Overrides:
toString in class Node_c

translate_

public void translate_(CodeWriter w,
                       Translator tr)
Write the catch block to an output file.
Specified by:
translate_ in interface Node
Overrides:
translate_ in class Node_c
Following copied from interface: jltools.ast.Node
Parameters:
w - The code writer to which to write.
tr - The translation pass. This is not a visitor.