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