KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > ba > EdgeTypes


1 /*
2  * Bytecode Analysis Framework
3  * Copyright (C) 2003,2004 University of Maryland
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package edu.umd.cs.findbugs.ba;
21
22 /**
23  * Constants defining the type of control flow edges,
24  * as well as flags defining additional information
25  * about the edges.
26  *
27  * @see Edge
28  */

29 public interface EdgeTypes {
30     /* ----------------------------------------------------------------------
31      * Edge types
32      * ---------------------------------------------------------------------- */

33
34     /**
35      * Unknown edge type.
36      */

37     public static final int UNKNOWN_EDGE = -1;
38     /**
39      * Edge type for fall-through to next instruction.
40      */

41     public static final int FALL_THROUGH_EDGE = 0;
42     /**
43      * Edge type for IFCMP instructions when condition is true.
44      */

45     public static final int IFCMP_EDGE = 1;
46     /**
47      * Edge type for switch instructions (explicit case).
48      */

49     public static final int SWITCH_EDGE = 2;
50     /**
51      * Edge type for switch instructions (default case).
52      */

53     public static final int SWITCH_DEFAULT_EDGE = 3;
54     /**
55      * Edge type for JSR instructions.
56      */

57     public static final int JSR_EDGE = 4;
58     /**
59      * Edge type for RET instructions.
60      */

61     public static final int RET_EDGE = 5;
62     /**
63      * Edge type for GOTO instructions.
64      */

65     public static final int GOTO_EDGE = 6;
66     /**
67      * Edge type for RETURN instructions. (These must go to the exit node of the CFG).
68      */

69     public static final int RETURN_EDGE = 7;
70     /**
71      * Edge representing the possibility that an exception might propagate
72      * out of the current method. Such edges always go to the exit node
73      * in the CFG.
74      */

75     public static final int UNHANDLED_EXCEPTION_EDGE = 8;
76     /**
77      * Edge representing control flow from an exception-raising basic block
78      * to an explicit handler for the exception.
79      */

80     public static final int HANDLED_EXCEPTION_EDGE = 9;
81     /**
82      * Edge from entry node to real start node.
83      */

84     public static final int START_EDGE = 10;
85     /**
86      * Special (synthetic) edge for path profiling; CFG entry to backedge target.
87      */

88     public static final int BACKEDGE_TARGET_EDGE = 11;
89     /**
90      * Special (synthetic) edge for path profiling; backedge source to CFG exit.
91      */

92     public static final int BACKEDGE_SOURCE_EDGE = 12;
93     /**
94      * System.exit() edge.
95      */

96     public static final int EXIT_EDGE = 13;
97
98     /* ----------------------------------------------------------------------
99      * Edge flags
100      * ---------------------------------------------------------------------- */

101
102     /**
103      * Checked exceptions can be thrown on edge.
104      */

105     public static final int CHECKED_EXCEPTIONS_FLAG = 1;
106
107     /**
108      * Explicit exceptions can be thrown on the edge.
109      */

110     public static final int EXPLICIT_EXCEPTIONS_FLAG = 2;
111 }
112
113 // vim:ts=3
114
Popular Tags