Class TryCatch


  • public class TryCatch
    extends java.lang.Object
    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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Label end()
      Get the end label of the protected block.
      Label handler()
      Get the start label of the catch block.
      void setHandler​(Label handler)
      Set the start label of the catch block.
      Label start()
      Get the start label of the protected block.
      java.lang.String toString()  
      Type type()
      Get the type of the exception to catch.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TryCatch

        public TryCatch​(Label start,
                        Label end,
                        Label handler,
                        Type type)
        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 Detail

      • start

        public Label start()
        Get the start label of the protected block.
        Returns:
        The start label.
      • end

        public Label end()
        Get the end label of the protected block.
        Returns:
        The end label.
      • handler

        public Label handler()
        Get the start label of the catch block.
        Returns:
        The handler label.
      • setHandler

        public void setHandler​(Label handler)
        Set the start label of the catch block.
      • type

        public Type type()
        Get the type of the exception to catch.
        Returns:
        The type of the exception to catch.
      • toString

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