/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.dexmaker;
import com.android.dx.rop.cst.CstType;
import java.util.HashMap;
import java.util.Map;
/**
* A primitive type, interface or class.
*
*
Warning: Use care when dealing with boxed primitive
* types. Java's lack of support for parameterized primitive types means that
* a primitive type like {@code int} and its boxed type {@code
* java.lang.Integer} have the same type parameter: {@code TypeId}.
* These types are different and it will be a runtime error if the boxed type
* {@code java.lang.Integer} is used where the primitive type {@code int} is
* expected.
*/
public final class TypeId {
/** The {@code boolean} primitive type. */
public static final TypeId BOOLEAN
= new TypeId(com.android.dx.rop.type.Type.BOOLEAN);
/** The {@code byte} primitive type. */
public static final TypeId BYTE = new TypeId(com.android.dx.rop.type.Type.BYTE);
/** The {@code char} primitive type. */
public static final TypeId CHAR
= new TypeId(com.android.dx.rop.type.Type.CHAR);
/** The {@code double} primitive type. */
public static final TypeId DOUBLE = new TypeId(com.android.dx.rop.type.Type.DOUBLE);
/** The {@code float} primitive type. */
public static final TypeId FLOAT = new TypeId(com.android.dx.rop.type.Type.FLOAT);
/** The {@code int} primitive type. */
public static final TypeId INT = new TypeId(com.android.dx.rop.type.Type.INT);
/** The {@code long} primitive type. */
public static final TypeId LONG = new TypeId(com.android.dx.rop.type.Type.LONG);
/** The {@code short} primitive type. */
public static final TypeId SHORT = new TypeId(com.android.dx.rop.type.Type.SHORT);
/** The {@code void} primitive type. Only used as a return type. */
public static final TypeId VOID = new TypeId(com.android.dx.rop.type.Type.VOID);
/** The {@code Object} type. */
public static final TypeId