Class TryCatch
java.lang.Object
EDU.purdue.cs.bloat.editor.TryCatch
TryCatch holds the labels for the start and end of a protected block and the
beginning of a catch block and the type of the exception to catch.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionend()Get the end label of the protected block.handler()Get the start label of the catch block.voidsetHandler(Label handler) Set the start label of the catch block.start()Get the start label of the protected block.toString()type()Get the type of the exception to catch.
-
Constructor Details
-
TryCatch
Constructor.- Parameters:
start- The start label of the protected block.end- The label of the instruction after the end of the protected block.handler- The start label of the exception handler.type- The type of exception to catch.
-
-
Method Details
-
start
-
end
-
handler
-
setHandler
Set the start label of the catch block. -
type
Get the type of the exception to catch.- Returns:
- The type of the exception to catch.
-
toString
-