org.jetbrains.kotlin.resolve
Class DescriptorResolver

java.lang.Object
  extended by org.jetbrains.kotlin.resolve.DescriptorResolver

public class DescriptorResolver
extends java.lang.Object


Constructor Summary
DescriptorResolver(AnnotationResolver annotationResolver, KotlinBuiltIns builtIns, StorageManager storageManager, TypeResolver typeResolver, SupertypeLoopChecker supertypeLoopsResolver, VariableTypeAndInitializerResolver variableTypeAndInitializerResolver, ExpressionTypingServices expressionTypingServices, OverloadChecker overloadChecker, LanguageVersionSettings languageVersionSettings, FunctionsTypingVisitor functionsTypingVisitor, DestructuringDeclarationResolver destructuringDeclarationResolver, ModifiersChecker modifiersChecker, com.intellij.openapi.project.Project project)
           
 
Method Summary
static void checkBounds(KtTypeReference typeReference, KotlinType type, BindingTrace trace)
           
static void checkBounds(KtTypeReference jetTypeArgument, KotlinType typeArgument, TypeParameterDescriptor typeParameterDescriptor, TypeSubstitutor substitutor, BindingTrace trace)
           
static void checkBoundsInTypeAlias(TypeAliasExpansionReportStrategy reportStrategy, KotlinType unsubstitutedArgument, KotlinType typeArgument, TypeParameterDescriptor typeParameterDescriptor, TypeSubstitutor substitutor)
           
static void checkConflictingUpperBounds(BindingTrace trace, TypeParameterDescriptor parameter, KtTypeParameter typeParameter)
           
static boolean checkHasOuterClassInstance(LexicalScope scope, BindingTrace trace, com.intellij.psi.PsiElement reportErrorsOn, ClassDescriptor target)
           
 void checkNamesInConstraints(KtTypeParameterListOwner declaration, DeclarationDescriptor descriptor, LexicalScope scope, BindingTrace trace)
           
static void checkUpperBoundType(KtTypeReference upperBound, KotlinType upperBoundType, BindingTrace trace)
           
static void checkUpperBoundTypes(BindingTrace trace, java.util.List<org.jetbrains.kotlin.resolve.DescriptorResolver.UpperBoundCheckRequest> requests)
           
static ClassConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(KtPureClassOrObject object, ClassDescriptor classDescriptor, BindingTrace trace)
           
static ClassDescriptor getContainingClass(LexicalScope scope)
           
static Modality getDefaultModality(DeclarationDescriptor containingDescriptor, Visibility visibility, boolean isBodyPresent)
           
static Visibility getDefaultVisibility(KtModifierListOwner modifierListOwner, DeclarationDescriptor containingDescriptor)
           
static boolean hasBody(KtProperty property)
           
static void registerFileInPackage(BindingTrace trace, KtFile file)
           
 void resolveGenericBounds(KtTypeParameterListOwner declaration, DeclarationDescriptor descriptor, LexicalScope scope, java.util.List<TypeParameterDescriptorImpl> parameters, BindingTrace trace)
           
 VariableDescriptor resolveLocalVariableDescriptor(KtParameter parameter, KotlinType type, BindingTrace trace, LexicalScope scope)
           
 VariableDescriptor resolveLocalVariableDescriptor(LexicalScope scope, KtParameter parameter, BindingTrace trace)
           
 PropertyDescriptor resolvePrimaryConstructorParameterToAProperty(ClassDescriptor classDescriptor, ValueParameterDescriptor valueParameter, LexicalScope scope, KtParameter parameter, BindingTrace trace)
           
 PropertyDescriptor resolvePropertyDescriptor(DeclarationDescriptor containingDeclaration, LexicalScope scopeForDeclarationResolution, LexicalScope scopeForInitializerResolution, KtProperty property, BindingTrace trace, DataFlowInfo dataFlowInfo)
           
 java.util.Collection<KotlinType> resolveSuperTypeListEntries(LexicalScope extensibleScope, java.util.List<KtSuperTypeListEntry> delegationSpecifiers, TypeResolver resolver, BindingTrace trace, boolean checkBounds)
           
 java.util.List<KotlinType> resolveSupertypes(LexicalScope scope, ClassDescriptor classDescriptor, KtPureClassOrObject correspondingClassOrObject, BindingTrace trace)
           
 TypeAliasDescriptor resolveTypeAliasDescriptor(DeclarationDescriptor containingDeclaration, LexicalScope scope, KtTypeAlias typeAlias, BindingTrace trace)
           
 java.util.List<TypeParameterDescriptorImpl> resolveTypeParametersForDescriptor(DeclarationDescriptor containingDescriptor, LexicalWritableScope extensibleScope, LexicalScope scopeForAnnotationsResolve, java.util.List<KtTypeParameter> typeParameters, BindingTrace trace)
           
 ValueParameterDescriptorImpl resolveValueParameterDescriptor(LexicalScope scope, FunctionDescriptor owner, KtParameter valueParameter, int index, KotlinType type, BindingTrace trace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorResolver

public DescriptorResolver(@NotNull
                          AnnotationResolver annotationResolver,
                          @NotNull
                          KotlinBuiltIns builtIns,
                          @NotNull
                          StorageManager storageManager,
                          @NotNull
                          TypeResolver typeResolver,
                          @NotNull
                          SupertypeLoopChecker supertypeLoopsResolver,
                          @NotNull
                          VariableTypeAndInitializerResolver variableTypeAndInitializerResolver,
                          @NotNull
                          ExpressionTypingServices expressionTypingServices,
                          @NotNull
                          OverloadChecker overloadChecker,
                          @NotNull
                          LanguageVersionSettings languageVersionSettings,
                          @NotNull
                          FunctionsTypingVisitor functionsTypingVisitor,
                          @NotNull
                          DestructuringDeclarationResolver destructuringDeclarationResolver,
                          @NotNull
                          ModifiersChecker modifiersChecker,
                          @NotNull
                          com.intellij.openapi.project.Project project)
Method Detail

resolveSupertypes

public java.util.List<KotlinType> resolveSupertypes(@NotNull
                                                    LexicalScope scope,
                                                    @NotNull
                                                    ClassDescriptor classDescriptor,
                                                    @Nullable
                                                    KtPureClassOrObject correspondingClassOrObject,
                                                    BindingTrace trace)

resolveSuperTypeListEntries

public java.util.Collection<KotlinType> resolveSuperTypeListEntries(LexicalScope extensibleScope,
                                                                    java.util.List<KtSuperTypeListEntry> delegationSpecifiers,
                                                                    @NotNull
                                                                    TypeResolver resolver,
                                                                    BindingTrace trace,
                                                                    boolean checkBounds)

getDefaultVisibility

public static Visibility getDefaultVisibility(KtModifierListOwner modifierListOwner,
                                              DeclarationDescriptor containingDescriptor)

getDefaultModality

public static Modality getDefaultModality(DeclarationDescriptor containingDescriptor,
                                          Visibility visibility,
                                          boolean isBodyPresent)

resolveValueParameterDescriptor

@NotNull
public ValueParameterDescriptorImpl resolveValueParameterDescriptor(@NotNull
                                                                            LexicalScope scope,
                                                                            @NotNull
                                                                            FunctionDescriptor owner,
                                                                            @NotNull
                                                                            KtParameter valueParameter,
                                                                            int index,
                                                                            @NotNull
                                                                            KotlinType type,
                                                                            @NotNull
                                                                            BindingTrace trace)

resolveTypeParametersForDescriptor

public java.util.List<TypeParameterDescriptorImpl> resolveTypeParametersForDescriptor(DeclarationDescriptor containingDescriptor,
                                                                                      LexicalWritableScope extensibleScope,
                                                                                      LexicalScope scopeForAnnotationsResolve,
                                                                                      java.util.List<KtTypeParameter> typeParameters,
                                                                                      BindingTrace trace)

createAndRecordPrimaryConstructorForObject

@NotNull
public static ClassConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(@Nullable
                                                                                                KtPureClassOrObject object,
                                                                                                @NotNull
                                                                                                ClassDescriptor classDescriptor,
                                                                                                @NotNull
                                                                                                BindingTrace trace)

resolveGenericBounds

public void resolveGenericBounds(@NotNull
                                 KtTypeParameterListOwner declaration,
                                 @NotNull
                                 DeclarationDescriptor descriptor,
                                 LexicalScope scope,
                                 java.util.List<TypeParameterDescriptorImpl> parameters,
                                 BindingTrace trace)

checkUpperBoundTypes

public static void checkUpperBoundTypes(@NotNull
                                        BindingTrace trace,
                                        @NotNull
                                        java.util.List<org.jetbrains.kotlin.resolve.DescriptorResolver.UpperBoundCheckRequest> requests)

checkConflictingUpperBounds

public static void checkConflictingUpperBounds(@NotNull
                                               BindingTrace trace,
                                               @NotNull
                                               TypeParameterDescriptor parameter,
                                               @NotNull
                                               KtTypeParameter typeParameter)

checkNamesInConstraints

public void checkNamesInConstraints(@NotNull
                                    KtTypeParameterListOwner declaration,
                                    @NotNull
                                    DeclarationDescriptor descriptor,
                                    @NotNull
                                    LexicalScope scope,
                                    @NotNull
                                    BindingTrace trace)

checkUpperBoundType

public static void checkUpperBoundType(KtTypeReference upperBound,
                                       @NotNull
                                       KotlinType upperBoundType,
                                       BindingTrace trace)

resolveLocalVariableDescriptor

@NotNull
public VariableDescriptor resolveLocalVariableDescriptor(@NotNull
                                                                 LexicalScope scope,
                                                                 @NotNull
                                                                 KtParameter parameter,
                                                                 BindingTrace trace)

resolveLocalVariableDescriptor

public VariableDescriptor resolveLocalVariableDescriptor(@NotNull
                                                         KtParameter parameter,
                                                         @NotNull
                                                         KotlinType type,
                                                         BindingTrace trace,
                                                         @NotNull
                                                         LexicalScope scope)

resolveTypeAliasDescriptor

@NotNull
public TypeAliasDescriptor resolveTypeAliasDescriptor(@NotNull
                                                              DeclarationDescriptor containingDeclaration,
                                                              @NotNull
                                                              LexicalScope scope,
                                                              @NotNull
                                                              KtTypeAlias typeAlias,
                                                              @NotNull
                                                              BindingTrace trace)

resolvePropertyDescriptor

@NotNull
public PropertyDescriptor resolvePropertyDescriptor(@NotNull
                                                            DeclarationDescriptor containingDeclaration,
                                                            @NotNull
                                                            LexicalScope scopeForDeclarationResolution,
                                                            @NotNull
                                                            LexicalScope scopeForInitializerResolution,
                                                            @NotNull
                                                            KtProperty property,
                                                            @NotNull
                                                            BindingTrace trace,
                                                            @NotNull
                                                            DataFlowInfo dataFlowInfo)

hasBody

public static boolean hasBody(KtProperty property)

resolvePrimaryConstructorParameterToAProperty

@NotNull
public PropertyDescriptor resolvePrimaryConstructorParameterToAProperty(@NotNull
                                                                                ClassDescriptor classDescriptor,
                                                                                @NotNull
                                                                                ValueParameterDescriptor valueParameter,
                                                                                @NotNull
                                                                                LexicalScope scope,
                                                                                @NotNull
                                                                                KtParameter parameter,
                                                                                BindingTrace trace)

checkBounds

public static void checkBounds(@NotNull
                               KtTypeReference typeReference,
                               @NotNull
                               KotlinType type,
                               @NotNull
                               BindingTrace trace)

checkBounds

public static void checkBounds(@NotNull
                               KtTypeReference jetTypeArgument,
                               @NotNull
                               KotlinType typeArgument,
                               @NotNull
                               TypeParameterDescriptor typeParameterDescriptor,
                               @NotNull
                               TypeSubstitutor substitutor,
                               @NotNull
                               BindingTrace trace)

checkBoundsInTypeAlias

public static void checkBoundsInTypeAlias(@NotNull
                                          TypeAliasExpansionReportStrategy reportStrategy,
                                          @NotNull
                                          KotlinType unsubstitutedArgument,
                                          @NotNull
                                          KotlinType typeArgument,
                                          @NotNull
                                          TypeParameterDescriptor typeParameterDescriptor,
                                          @NotNull
                                          TypeSubstitutor substitutor)

checkHasOuterClassInstance

public static boolean checkHasOuterClassInstance(@NotNull
                                                 LexicalScope scope,
                                                 @NotNull
                                                 BindingTrace trace,
                                                 @NotNull
                                                 com.intellij.psi.PsiElement reportErrorsOn,
                                                 @NotNull
                                                 ClassDescriptor target)

getContainingClass

@Nullable
public static ClassDescriptor getContainingClass(@NotNull
                                                          LexicalScope scope)

registerFileInPackage

public static void registerFileInPackage(@NotNull
                                         BindingTrace trace,
                                         @NotNull
                                         KtFile file)