KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > ba > type > ExtendedTypes


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.type;
21
22 /**
23  * Extended type codes used by StackAndLocalTypes and StackAndLocalTypeAnalysis
24  * for typing locals and stack values used in Java bytecode.
25  *
26  * @author David Hovemeyer
27  * @see TypeFrame
28  * @see TypeAnalysis
29  */

30 public interface ExtendedTypes {
31     // FIXME: these values depend on those in org.apache.bcel.Constants.
32
// They need to be distinct from all type codes defined there.
33
// It would be nice if BCEL provided built-in functionality for
34
// some or all of these.
35

36     /**
37      * Special type code for the "Top" type in the lattice.
38      */

39     public static final byte T_TOP = 17;
40
41     /**
42      * Special type that represents the value store in
43      * local <i>n+1</i> when a long value is stored in
44      * local <i>n</i>.
45      */

46     public static final byte T_LONG_EXTRA = 18;
47
48     /**
49      * Special type that represents the value store in
50      * local <i>n+1</i> when a double value is stored in
51      * local <i>n</i>.
52      */

53     public static final byte T_DOUBLE_EXTRA = 19;
54
55     /**
56      * Special type code for the "Bottom" type in the lattice.
57      */

58     public static final byte T_BOTTOM = 20;
59
60     /**
61      * Special type code for the "Null" type.
62      * This is a type which is higher in the lattice than any object type,
63      * but lower than the overall Top type. It represents the type
64      * of the null value, which may logically be merged with any
65      * object type without loss of information.
66      */

67     public static final byte T_NULL = 21;
68
69     /**
70      * Special type code for "Exception" object type,
71      * which is an instance of the ExceptionObjectType class.
72      * These instances maintain an ExceptionSet to keep track
73      * of possible exceptions that are feasible, and whether those
74      * exceptions are explicit or implicit.
75      */

76     public static final byte T_EXCEPTION = 22;
77
78     /**
79      * A Type code that is available for "user-defined" types.
80      * Any type code equal or greated than this one is guaranteed
81      * to be distinct from both standard and extended types.
82      */

83     public static final byte T_AVAIL_TYPE = 100;
84 }
85
86 // vim:ts=4
87
Popular Tags