All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.TryStatement

java.lang.Object
   |
   +----openjava.ptree.PtreeObject
           |
           +----openjava.ptree.NonLeaf
                   |
                   +----openjava.ptree.TryStatement

public class TryStatement
extends NonLeaf
implements Statement, Ptree
The TryStatement class represents a try statement node of parse tree.

See Also:
Ptree, NonLeaf, Statement, StatementList, CatchList

Constructor Index

 o TryStatement(StatementList, CatchList)
Allocates a new TryStatement object.
 o TryStatement(StatementList, CatchList, StatementList)
Allocates a new TryStatement object.
 o TryStatement(StatementList, StatementList)
Allocates a new TryStatement object.

Method Index

 o getBody()
Gets the body of this try statement.
 o getCatchList()
Gets the catch block list.
 o getFinallyBody()
Gets the finally body.
 o setBody(StatementList)
Sets the body of this try statement.
 o setCatchList(CatchList)
Sets the catch block list.
 o setFinallyBody(StatementList)
Sets the finally body.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o TryStatement
 public TryStatement(StatementList stmts,
                     CatchList catchlist,
                     StatementList finallee)
Allocates a new TryStatement object.

Parameters:
the - statement list of the body of this try statement.
the - catch block list of this try statement.
the - statement list of the finally block.
 o TryStatement
 public TryStatement(StatementList stmts,
                     CatchList catchlist)
Allocates a new TryStatement object.

Parameters:
the - statement list of the body of this try statement.
the - catch block list of this try statement.
 o TryStatement
 public TryStatement(StatementList stmts,
                     StatementList finallee)
Allocates a new TryStatement object.

Parameters:
the - statement list of the body of this try statement.
the - statement list of the finally block.

Methods

 o writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

Overrides:
writeCode in class NonLeaf
 o getBody
 public StatementList getBody()
Gets the body of this try statement.

Returns:
the statement list of the body.
 o setBody
 public void setBody(StatementList stmts)
Sets the body of this try statement.

Parameters:
stmts - the statement list of the body to set.
 o getCatchList
 public CatchList getCatchList()
Gets the catch block list.

Returns:
the catch block list.
 o setCatchList
 public void setCatchList(CatchList catchlist)
Sets the catch block list.

Parameters:
catchlist - the catch block list.
 o getFinallyBody
 public StatementList getFinallyBody()
Gets the finally body.

Returns:
the statement list of finally body.
 o setFinallyBody
 public void setFinallyBody(StatementList finallee)
Sets the finally body.

Parameters:
finallee - the statement list of finally body.

All Packages  Class Hierarchy  This Package  Previous  Next  Index