001/*
002 * Copyright 2010-2013 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.jetbrains.jet.lang.resolve.java;
018
019import jet.runtime.typeinfo.JetConstructor;
020
021public class JvmStdlibNames {
022
023    public static final JvmClassName JET_VALUE_PARAMETER = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetValueParameter");
024
025    public static final String JET_VALUE_PARAMETER_NAME_FIELD = "name";
026    public static final String JET_VALUE_PARAMETER_HAS_DEFAULT_VALUE_FIELD = "hasDefaultValue";
027    public static final String JET_VALUE_PARAMETER_TYPE_FIELD = "type";
028    public static final String JET_VALUE_PARAMETER_RECEIVER_FIELD = "receiver";
029    public static final String JET_VALUE_PARAMETER_VARARG = "vararg";
030
031
032    public static final JvmClassName JET_TYPE_PARAMETER = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetTypeParameter");
033
034
035    public static final JvmClassName JET_METHOD = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetMethod");
036
037    public static final String JET_FLAGS_FIELD = "flags";
038
039    public static final String JET_METHOD_RETURN_TYPE_FIELD = "returnType";
040    public static final String JET_METHOD_TYPE_PARAMETERS_FIELD = "typeParameters";
041    public static final String JET_METHOD_PROPERTY_TYPE_FIELD = "propertyType";
042
043    public static final int FLAGS_DEFAULT_VALUE = 0;
044
045    public static final int FLAG_PROPERTY_BIT = 1;
046    public static final int FLAG_FORCE_OPEN_BIT = 1 << 1;
047    public static final int FLAG_FORCE_FINAL_BIT = 1 << 2;
048    public static final int FLAG_PRIVATE_BIT =  1 << 3;
049    public static final int FLAG_INTERNAL_BIT = 1 << 4;
050    public static final int FLAG_PROTECTED_BIT = 1 << 5;
051
052    // for method, three bits (one reserved)
053    public static final int FLAG_METHOD_KIND_MASK = 7 << 6;
054    public static final int FLAG_METHOD_KIND_DECLARATION =   0 << 6;
055    public static final int FLAG_METHOD_KIND_FAKE_OVERRIDE = 1 << 6;
056    public static final int FLAG_METHOD_KIND_DELEGATION =    2 << 6;
057    public static final int FLAG_METHOD_KIND_SYNTHESIZED =   3 << 6;
058
059    public static final int FLAG_CLASS_KIND_MASK = 7 << 6;
060    public static final int FLAG_CLASS_KIND_DEFAULT = 0 << 6;
061    public static final int FLAG_CLASS_KIND_OBJECT = 1 << 6;
062
063    public static final JvmClassName JET_CONSTRUCTOR = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetConstructor");
064
065    /**
066     * @deprecated
067     * @see JetConstructor#hidden()
068     */
069    public static final String JET_CONSTRUCTOR_HIDDEN_FIELD = "hidden";
070
071
072    public static final JvmClassName JET_CLASS = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetClass");
073
074    public static final JvmClassName JET_CLASS_OBJECT = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetClassObject");
075
076    public static final JvmClassName JET_PACKAGE_CLASS = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetPackageClass");
077
078    public static final String ABI_VERSION_NAME = "abiVersion";
079
080    public static final String JET_CLASS_SIGNATURE = "signature";
081
082
083    public static final JvmClassName JET_OBJECT = JvmClassName.byFqNameWithoutInnerClasses("jet.JetObject");
084
085
086    public static final JvmClassName ASSERT_INVISIBLE_IN_RESOLVER = JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.jet.rt.annotation.AssertInvisibleInResolver");
087
088    public static final JvmClassName KOTLIN_SIGNATURE = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.KotlinSignature");
089    public static final String KOTLIN_SIGNATURE_VALUE_METHOD = "value";
090
091    private JvmStdlibNames() {
092    }
093}