001: /*
002: * Bytecode Analysis Framework
003: * Copyright (C) 2003,2004 University of Maryland
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2.1 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: */
019:
020: package edu.umd.cs.findbugs.ba;
021:
022: /**
023: * Constants defining the type of control flow edges,
024: * as well as flags defining additional information
025: * about the edges.
026: *
027: * @see Edge
028: */
029: public interface EdgeTypes {
030: /* ----------------------------------------------------------------------
031: * Edge types
032: * ---------------------------------------------------------------------- */
033:
034: /**
035: * Unknown edge type.
036: */
037: public static final int UNKNOWN_EDGE = -1;
038: /**
039: * Edge type for fall-through to next instruction.
040: */
041: public static final int FALL_THROUGH_EDGE = 0;
042: /**
043: * Edge type for IFCMP instructions when condition is true.
044: */
045: public static final int IFCMP_EDGE = 1;
046: /**
047: * Edge type for switch instructions (explicit case).
048: */
049: public static final int SWITCH_EDGE = 2;
050: /**
051: * Edge type for switch instructions (default case).
052: */
053: public static final int SWITCH_DEFAULT_EDGE = 3;
054: /**
055: * Edge type for JSR instructions.
056: */
057: public static final int JSR_EDGE = 4;
058: /**
059: * Edge type for RET instructions.
060: */
061: public static final int RET_EDGE = 5;
062: /**
063: * Edge type for GOTO instructions.
064: */
065: public static final int GOTO_EDGE = 6;
066: /**
067: * Edge type for RETURN instructions. (These must go to the exit node of the CFG).
068: */
069: public static final int RETURN_EDGE = 7;
070: /**
071: * Edge representing the possibility that an exception might propagate
072: * out of the current method. Such edges always go to the exit node
073: * in the CFG.
074: */
075: public static final int UNHANDLED_EXCEPTION_EDGE = 8;
076: /**
077: * Edge representing control flow from an exception-raising basic block
078: * to an explicit handler for the exception.
079: */
080: public static final int HANDLED_EXCEPTION_EDGE = 9;
081: /**
082: * Edge from entry node to real start node.
083: */
084: public static final int START_EDGE = 10;
085: /**
086: * Special (synthetic) edge for path profiling; CFG entry to backedge target.
087: */
088: public static final int BACKEDGE_TARGET_EDGE = 11;
089: /**
090: * Special (synthetic) edge for path profiling; backedge source to CFG exit.
091: */
092: public static final int BACKEDGE_SOURCE_EDGE = 12;
093: /**
094: * System.exit() edge.
095: */
096: public static final int EXIT_EDGE = 13;
097:
098: /* ----------------------------------------------------------------------
099: * 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
|