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
017 package org.jetbrains.jet.lang.descriptors;
018
019 import org.jetbrains.annotations.NotNull;
020 import org.jetbrains.annotations.Nullable;
021 import org.jetbrains.annotations.ReadOnly;
022 import org.jetbrains.jet.lang.resolve.scopes.JetScope;
023 import org.jetbrains.jet.lang.types.JetType;
024 import org.jetbrains.jet.lang.types.TypeProjection;
025 import org.jetbrains.jet.lang.types.TypeSubstitutor;
026
027 import java.util.Collection;
028 import java.util.List;
029
030 public interface ClassDescriptor extends ClassifierDescriptor, MemberDescriptor, ClassOrPackageFragmentDescriptor {
031
032 @NotNull
033 JetScope getMemberScope(@NotNull List<? extends TypeProjection> typeArguments);
034
035 @NotNull
036 JetScope getUnsubstitutedInnerClassesScope();
037
038 @NotNull
039 @ReadOnly
040 Collection<ConstructorDescriptor> getConstructors();
041
042 @Override
043 @NotNull
044 DeclarationDescriptor getContainingDeclaration();
045
046 /**
047 * @return type A<T> for the class A<T>
048 */
049 @NotNull
050 @Override
051 JetType getDefaultType();
052
053 @NotNull
054 @Override
055 ClassDescriptor substitute(@NotNull TypeSubstitutor substitutor);
056
057 @Nullable
058 @Override
059 JetType getClassObjectType();
060
061 @Nullable
062 ClassDescriptor getClassObjectDescriptor();
063
064 @NotNull
065 ClassKind getKind();
066
067 @Override
068 @NotNull
069 Modality getModality();
070
071 @Override
072 @NotNull
073 Visibility getVisibility();
074
075 /**
076 * @return <code>true</code> if this class contains a reference to its outer class (as opposed to static nested class)
077 */
078 boolean isInner();
079
080 @NotNull
081 ReceiverParameterDescriptor getThisAsReceiverParameter();
082
083 @Nullable
084 ConstructorDescriptor getUnsubstitutedPrimaryConstructor();
085 }