aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/block/ExceptionBlock.java
blob: c00a7e1e342055f2ef3e3e9d5e96cda414451e8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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();

}