src/share/classes/com/sun/tools/javac/code/TypeTags.java

changeset 1
9a66ca7c79fa
child 554
9d9f26857129
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/TypeTags.java	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,136 @@
     1.4 +/*
     1.5 + * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Sun designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Sun in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.26 + * have any questions.
    1.27 + */
    1.28 +
    1.29 +package com.sun.tools.javac.code;
    1.30 +
    1.31 +
    1.32 +/** An interface for type tag values, which distinguish between different
    1.33 + *  sorts of types.
    1.34 + *
    1.35 + *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
    1.36 + *  you write code that depends on this, you do so at your own risk.
    1.37 + *  This code and its internal interfaces are subject to change or
    1.38 + *  deletion without notice.</b>
    1.39 + */
    1.40 +public class TypeTags {
    1.41 +
    1.42 +    private TypeTags() {} // uninstantiable
    1.43 +
    1.44 +    /** The tag of the basic type `byte'.
    1.45 +     */
    1.46 +    public static final int BYTE = 1;
    1.47 +
    1.48 +    /** The tag of the basic type `char'.
    1.49 +     */
    1.50 +    public static final int CHAR = BYTE+1;
    1.51 +
    1.52 +    /** The tag of the basic type `short'.
    1.53 +     */
    1.54 +    public static final int SHORT = CHAR+1;
    1.55 +
    1.56 +    /** The tag of the basic type `int'.
    1.57 +     */
    1.58 +    public static final int INT = SHORT+1;
    1.59 +
    1.60 +    /** The tag of the basic type `long'.
    1.61 +     */
    1.62 +    public static final int LONG = INT+1;
    1.63 +
    1.64 +    /** The tag of the basic type `float'.
    1.65 +     */
    1.66 +    public static final int FLOAT = LONG+1;
    1.67 +
    1.68 +    /** The tag of the basic type `double'.
    1.69 +     */
    1.70 +    public static final int DOUBLE = FLOAT+1;
    1.71 +
    1.72 +    /** The tag of the basic type `boolean'.
    1.73 +     */
    1.74 +    public static final int BOOLEAN = DOUBLE+1;
    1.75 +
    1.76 +    /** The tag of the type `void'.
    1.77 +     */
    1.78 +    public static final int VOID = BOOLEAN+1;
    1.79 +
    1.80 +    /** The tag of all class and interface types.
    1.81 +     */
    1.82 +    public static final int CLASS = VOID+1;
    1.83 +
    1.84 +    /** The tag of all array types.
    1.85 +     */
    1.86 +    public static final int ARRAY = CLASS+1;
    1.87 +
    1.88 +    /** The tag of all (monomorphic) method types.
    1.89 +     */
    1.90 +    public static final int METHOD = ARRAY+1;
    1.91 +
    1.92 +    /** The tag of all package "types".
    1.93 +     */
    1.94 +    public static final int PACKAGE = METHOD+1;
    1.95 +
    1.96 +    /** The tag of all (source-level) type variables.
    1.97 +     */
    1.98 +    public static final int TYPEVAR = PACKAGE+1;
    1.99 +
   1.100 +    /** The tag of all type arguments.
   1.101 +     */
   1.102 +    public static final int WILDCARD = TYPEVAR+1;
   1.103 +
   1.104 +    /** The tag of all polymorphic (method-) types.
   1.105 +     */
   1.106 +    public static final int FORALL = WILDCARD+1;
   1.107 +
   1.108 +    /** The tag of the bottom type <null>.
   1.109 +     */
   1.110 +    public static final int BOT = FORALL+1;
   1.111 +
   1.112 +    /** The tag of a missing type.
   1.113 +     */
   1.114 +    public static final int NONE = BOT+1;
   1.115 +
   1.116 +    /** The tag of the error type.
   1.117 +     */
   1.118 +    public static final int ERROR = NONE+1;
   1.119 +
   1.120 +    /** The tag of an unknown type
   1.121 +     */
   1.122 +    public static final int UNKNOWN = ERROR+1;
   1.123 +
   1.124 +    /** The tag of all instantiatable type variables.
   1.125 +     */
   1.126 +    public static final int UNDETVAR = UNKNOWN+1;
   1.127 +
   1.128 +    /** The number of type tags.
   1.129 +     */
   1.130 +    public static final int TypeTagCount = UNDETVAR+1;
   1.131 +
   1.132 +    /** The maximum tag of a basic type.
   1.133 +     */
   1.134 +    public static final int lastBaseTag = BOOLEAN;
   1.135 +
   1.136 +    /** The minimum tag of a partial type
   1.137 +     */
   1.138 +    public static final int firstPartialTag = ERROR;
   1.139 +}

mercurial