/* * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.javac.code; import com.sun.source.tree.Tree.Kind; import javax.lang.model.type.TypeKind; import static com.sun.tools.javac.code.TypeTag.NumericClasses.*; /** An interface for type tag values, which distinguish between different * sorts of types. * *
This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.
*/
public enum TypeTag {
/** The tag of the basic type `byte'.
*/
BYTE(BYTE_CLASS, BYTE_SUPERCLASSES, true),
/** The tag of the basic type `char'.
*/
CHAR(CHAR_CLASS, CHAR_SUPERCLASSES, true),
/** The tag of the basic type `short'.
*/
SHORT(SHORT_CLASS, SHORT_SUPERCLASSES, true),
/** The tag of the basic type `long'.
*/
LONG(LONG_CLASS, LONG_SUPERCLASSES, true),
/** The tag of the basic type `float'.
*/
FLOAT(FLOAT_CLASS, FLOAT_SUPERCLASSES, true),
/** The tag of the basic type `int'.
*/
INT(INT_CLASS, INT_SUPERCLASSES, true),
/** The tag of the basic type `double'.
*/
DOUBLE(DOUBLE_CLASS, DOUBLE_CLASS, true),
/** The tag of the basic type `boolean'.
*/
BOOLEAN(0, 0, true),
/** The tag of the type `void'.
*/
VOID,
/** The tag of all class and interface types.
*/
CLASS,
/** The tag of all array types.
*/
ARRAY,
/** The tag of all (monomorphic) method types.
*/
METHOD,
/** The tag of all package "types".
*/
PACKAGE,
/** The tag of all (source-level) type variables.
*/
TYPEVAR,
/** The tag of all type arguments.
*/
WILDCARD,
/** The tag of all polymorphic (method-) types.
*/
FORALL,
/** The tag of deferred expression types in method context
*/
DEFERRED,
/** The tag of the bottom type {@code