Class Handler

java.lang.Object
EDU.purdue.cs.bloat.cfg.Handler

public class Handler extends 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:
  • Constructor Details

    • 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 Details

    • protectedBlocks

      public 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 String toString()
      Overrides:
      toString in class Object