1 | /* |
2 | * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. |
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | * |
5 | * This code is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License version 2 only, as |
7 | * published by the Free Software Foundation. Sun designates this |
8 | * particular file as subject to the "Classpath" exception as provided |
9 | * by Sun in the LICENSE file that accompanied this code. |
10 | * |
11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
14 | * version 2 for more details (a copy is included in the LICENSE file that |
15 | * accompanied this code). |
16 | * |
17 | * You should have received a copy of the GNU General Public License version |
18 | * 2 along with this work; if not, write to the Free Software Foundation, |
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
20 | * |
21 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
22 | * CA 95054 USA or visit www.sun.com if you need additional information or |
23 | * have any questions. |
24 | */ |
25 | |
26 | package com.sun.tools.javac.code; |
27 | |
28 | |
29 | /** An interface for type tag values, which distinguish between different |
30 | * sorts of types. |
31 | * |
32 | * <p><b>This is NOT part of any API supported by Sun Microsystems. If |
33 | * you write code that depends on this, you do so at your own risk. |
34 | * This code and its internal interfaces are subject to change or |
35 | * deletion without notice.</b> |
36 | */ |
37 | public class TypeTags { |
38 | |
39 | private TypeTags() {} // uninstantiable |
40 | |
41 | /** The tag of the basic type `byte'. |
42 | */ |
43 | public static final int BYTE = 1; |
44 | |
45 | /** The tag of the basic type `char'. |
46 | */ |
47 | public static final int CHAR = BYTE+1; |
48 | |
49 | /** The tag of the basic type `short'. |
50 | */ |
51 | public static final int SHORT = CHAR+1; |
52 | |
53 | /** The tag of the basic type `int'. |
54 | */ |
55 | public static final int INT = SHORT+1; |
56 | |
57 | /** The tag of the basic type `long'. |
58 | */ |
59 | public static final int LONG = INT+1; |
60 | |
61 | /** The tag of the basic type `float'. |
62 | */ |
63 | public static final int FLOAT = LONG+1; |
64 | |
65 | /** The tag of the basic type `double'. |
66 | */ |
67 | public static final int DOUBLE = FLOAT+1; |
68 | |
69 | /** The tag of the basic type `boolean'. |
70 | */ |
71 | public static final int BOOLEAN = DOUBLE+1; |
72 | |
73 | /** The tag of the type `void'. |
74 | */ |
75 | public static final int VOID = BOOLEAN+1; |
76 | |
77 | /** The tag of all class and interface types. |
78 | */ |
79 | public static final int CLASS = VOID+1; |
80 | |
81 | /** The tag of all array types. |
82 | */ |
83 | public static final int ARRAY = CLASS+1; |
84 | |
85 | /** The tag of all (monomorphic) method types. |
86 | */ |
87 | public static final int METHOD = ARRAY+1; |
88 | |
89 | /** The tag of all package "types". |
90 | */ |
91 | public static final int PACKAGE = METHOD+1; |
92 | |
93 | /** The tag of all (source-level) type variables. |
94 | */ |
95 | public static final int TYPEVAR = PACKAGE+1; |
96 | |
97 | /** The tag of all type arguments. |
98 | */ |
99 | public static final int WILDCARD = TYPEVAR+1; |
100 | |
101 | /** The tag of all polymorphic (method-) types. |
102 | */ |
103 | public static final int FORALL = WILDCARD+1; |
104 | |
105 | /** The tag of the bottom type <null>. |
106 | */ |
107 | public static final int BOT = FORALL+1; |
108 | |
109 | /** The tag of a missing type. |
110 | */ |
111 | public static final int NONE = BOT+1; |
112 | |
113 | /** The tag of the error type. |
114 | */ |
115 | public static final int ERROR = NONE+1; |
116 | |
117 | /** The tag of an unknown type |
118 | */ |
119 | public static final int UNKNOWN = ERROR+1; |
120 | |
121 | /** The tag of all instantiatable type variables. |
122 | */ |
123 | public static final int UNDETVAR = UNKNOWN+1; |
124 | |
125 | /** The number of type tags. |
126 | */ |
127 | public static final int TypeTagCount = UNDETVAR+1; |
128 | |
129 | /** The maximum tag of a basic type. |
130 | */ |
131 | public static final int lastBaseTag = BOOLEAN; |
132 | |
133 | /** The minimum tag of a partial type |
134 | */ |
135 | public static final int firstPartialTag = ERROR; |
136 | } |