Package jminusminus

Class CLException

java.lang.Object
jminusminus.CLException

class CLException extends Object
Representation of an exception handler.
  • Field Details

    • startLabel

      public String startLabel
    • endLabel

      public String endLabel
    • handlerLabel

      public String handlerLabel
    • catchType

      public String catchType
    • startPC

      public int startPC
    • endPC

      public int endPC
    • handlerPC

      public int handlerPC
  • Constructor Details

    • CLException

      public CLException(String startLabel, String endLabel, String handlerLabel, String catchType)
      Constructs a CLException object.
      Parameters:
      startLabel - the exception handler is active from the instruction following this label in the code section of the current method being added ...
      endLabel - to the instruction following this label. Formally, the handler is active while the program counter is within the interval [startLabel, endLabel).
      handlerLabel - the handler begins with instruction following this label.
      catchType - the exception type that this exception handler is designated to catch, as a fully qualified name in internal form.
  • Method Details

    • resolveLabels

      public boolean resolveLabels(Hashtable<String,Integer> labelToPC)
      Resolves the jump labels to the corresponding pc values using the given label to pc mapping. If unable to resolve a label, the corresponding pc is set to 0.
      Parameters:
      labelToPC - label to pc mapping.
      Returns:
      true if all labels were resolved successfully, and false otherwise.