aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java')
-rw-r--r--third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java
new file mode 100644
index 0000000000..da024d12ef
--- /dev/null
+++ b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java
@@ -0,0 +1,38 @@
+package org.checkerframework.dataflow.cfg.block;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.lang.model.type.TypeMirror;
+
+import org.checkerframework.dataflow.cfg.node.Node;
+
+/**
+ * Represents a basic block that contains exactly one {@link Node} which can
+ * throw an exception. This block has exactly one non-exceptional successor, and
+ * one or more exceptional successors.
+ *
+ * <p>
+ *
+ * The following invariant holds.
+ *
+ * <pre>
+ * getNode().getBlock() == this
+ * </pre>
+ *
+ * @author Stefan Heule
+ *
+ */
+public interface ExceptionBlock extends SingleSuccessorBlock {
+
+ /**
+ * @return the node of this block
+ */
+ Node getNode();
+
+ /**
+ * @return the list of exceptional successor blocks as an unmodifiable map
+ */
+ Map<TypeMirror, Set<Block>> getExceptionalSuccessors();
+
+}