|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.hir.Statement
cetus.hir.CompoundStatement
cetus.hir.ExceptionHandler
public class ExceptionHandler
Represents an exception handling block (try-catch-finally block) in a C++ or Java program. This class is derived from CompoundStatement because in C++ it is legal to have a procedure whose body is an exception handler. An exception handler has a try block followed by at least one catch block followed optionally by a finally block.
| Field Summary |
|---|
| Fields inherited from class cetus.hir.Statement |
|---|
annotations, children, line_number, object_print_method, parent |
| Constructor Summary | |
|---|---|
ExceptionHandler(CompoundStatement try_block,
java.util.List catch_blocks)
Creates an exception handler. |
|
ExceptionHandler(CompoundStatement try_block,
java.util.List catch_blocks,
CompoundStatement finally_block)
Creates an exception handler. |
|
| Method Summary | |
|---|---|
void |
addCatchBlock(CompoundStatement catch_block)
Appends a catch block to the list of catch blocks. |
void |
addFinallyBlock(CompoundStatement finally_block)
|
static void |
defaultPrint(ExceptionHandler stmt,
java.io.OutputStream stream)
Prints a statement to a stream. |
java.lang.String |
toString()
Returns a string representation of this compound statement. |
| Methods inherited from class cetus.hir.CompoundStatement |
|---|
addDeclaration, addDeclarationAfter, addDeclarationBefore, addStatement, addStatementAfter, addStatementBefore, clone, countStatements, defaultPrint, findSymbol, getParentTables, getTable, removeChild |
| Methods inherited from class cetus.hir.Statement |
|---|
annotate, annotateAfter, annotateBefore, annotationToString, containsAnnotation, detach, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getChildren, getParent, getProcedure, print, removeAnnotations, removeAnnotations, setChild, setLineNumber, setParent, setPrintMethod, swapWith, toAnnotatedString, verify, where |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionHandler(CompoundStatement try_block,
java.util.List catch_blocks)
public ExceptionHandler(CompoundStatement try_block,
java.util.List catch_blocks,
CompoundStatement finally_block)
| Method Detail |
|---|
public void addCatchBlock(CompoundStatement catch_block)
catch_block - The block to add.public void addFinallyBlock(CompoundStatement finally_block)
public static void defaultPrint(ExceptionHandler stmt,
java.io.OutputStream stream)
stmt - The statement to print.stream - The stream on which to print the statement.public java.lang.String toString()
CompoundStatement
toString in class CompoundStatement
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||