Class Handler


  • public class Handler
    extends java.lang.Object
    Handler represents a try-catch block. It containes a set of protected Blocks (the "try" blocks), a catch Block, and the Type of exception that is caught by the catch block.
    See Also:
    Block, Catch, TryCatch
    • Constructor Detail

      • Handler

        public Handler​(Block catchBlock,
                       Type type)
        Constructor.
        Parameters:
        catchBlock - The block of code that handles an exception
        type - The type of exception that is thrown
    • Method Detail

      • protectedBlocks

        public java.util.Collection protectedBlocks()
        Returns a Collection of the "try" blocks.
      • setCatchBlock

        public void setCatchBlock​(Block block)
      • catchBlock

        public Block catchBlock()
      • catchType

        public Type catchType()
      • toString

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