Package jminusminus
Class CLException
java.lang.Object
jminusminus.CLException
Representation of an exception handler.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCLException
(String startLabel, String endLabel, String handlerLabel, String catchType) Constructs a CLException object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
resolveLabels
(Hashtable<String, Integer> labelToPC) Resolves the jump labels to the corresponding pc values using the given label to pc mapping.
-
Field Details
-
startLabel
-
endLabel
-
handlerLabel
-
catchType
-
startPC
public int startPC -
endPC
public int endPC -
handlerPC
public int handlerPC
-
-
Constructor Details
-
CLException
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
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.
-