001: /*
002: * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package com.sun.tools.javac.code;
027:
028: import com.sun.tools.javac.util.Version;
029:
030: /** An interface for type tag values, which distinguish between different
031: * sorts of types.
032: *
033: * <p><b>This is NOT part of any API supported by Sun Microsystems. If
034: * you write code that depends on this, you do so at your own risk.
035: * This code and its internal interfaces are subject to change or
036: * deletion without notice.</b>
037: */
038: @Version("@(#)TypeTags.java 1.28 07/05/05")
039: public class TypeTags {
040:
041: private TypeTags() {
042: } // uninstantiable
043:
044: /** The tag of the basic type `byte'.
045: */
046: public static final int BYTE = 1;
047:
048: /** The tag of the basic type `char'.
049: */
050: public static final int CHAR = BYTE + 1;
051:
052: /** The tag of the basic type `short'.
053: */
054: public static final int SHORT = CHAR + 1;
055:
056: /** The tag of the basic type `int'.
057: */
058: public static final int INT = SHORT + 1;
059:
060: /** The tag of the basic type `long'.
061: */
062: public static final int LONG = INT + 1;
063:
064: /** The tag of the basic type `float'.
065: */
066: public static final int FLOAT = LONG + 1;
067:
068: /** The tag of the basic type `double'.
069: */
070: public static final int DOUBLE = FLOAT + 1;
071:
072: /** The tag of the basic type `boolean'.
073: */
074: public static final int BOOLEAN = DOUBLE + 1;
075:
076: /** The tag of the type `void'.
077: */
078: public static final int VOID = BOOLEAN + 1;
079:
080: /** The tag of all class and interface types.
081: */
082: public static final int CLASS = VOID + 1;
083:
084: /** The tag of all array types.
085: */
086: public static final int ARRAY = CLASS + 1;
087:
088: /** The tag of all (monomorphic) method types.
089: */
090: public static final int METHOD = ARRAY + 1;
091:
092: /** The tag of all package "types".
093: */
094: public static final int PACKAGE = METHOD + 1;
095:
096: /** The tag of all (source-level) type variables.
097: */
098: public static final int TYPEVAR = PACKAGE + 1;
099:
100: /** The tag of all type arguments.
101: */
102: public static final int WILDCARD = TYPEVAR + 1;
103:
104: /** The tag of all polymorphic (method-) types.
105: */
106: public static final int FORALL = WILDCARD + 1;
107:
108: /** The tag of the bottom type <null>.
109: */
110: public static final int BOT = FORALL + 1;
111:
112: /** The tag of a missing type.
113: */
114: public static final int NONE = BOT + 1;
115:
116: /** The tag of the error type.
117: */
118: public static final int ERROR = NONE + 1;
119:
120: /** The tag of an unknown type
121: */
122: public static final int UNKNOWN = ERROR + 1;
123:
124: /** The tag of all instantiatable type variables.
125: */
126: public static final int UNDETVAR = UNKNOWN + 1;
127:
128: /** The number of type tags.
129: */
130: public static final int TypeTagCount = UNDETVAR + 1;
131:
132: /** The maximum tag of a basic type.
133: */
134: public static final int lastBaseTag = BOOLEAN;
135:
136: /** The minimum tag of a partial type
137: */
138: public static final int firstPartialTag = ERROR;
139: }
|