org.jetbrains.kotlin.resolve
Class DescriptorResolver

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

public class DescriptorResolver
extends java.lang.Object


Field Summary
static Name COPY_METHOD_NAME
           
 
Constructor Summary
DescriptorResolver(AnnotationResolver annotationResolver, KotlinBuiltIns builtIns, StorageManager storageManager, TypeResolver typeResolver, SupertypeLoopChecker supertypeLoopsResolver, VariableTypeResolver variableTypeResolver, ExpressionTypingServices expressionTypingServices)
           
 
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 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 ConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(KtClassOrObject object, ClassDescriptor classDescriptor, BindingTrace trace)
           
static SimpleFunctionDescriptor createComponentFunctionDescriptor(int parameterIndex, PropertyDescriptor property, ValueParameterDescriptor parameter, ClassDescriptor classDescriptor, BindingTrace trace)
           
static SimpleFunctionDescriptor createCopyFunctionDescriptor(java.util.Collection<ValueParameterDescriptor> constructorParameters, 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 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 scope, 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, KtClassOrObject jetClass, BindingTrace trace)
           
 java.util.List<TypeParameterDescriptorImpl> resolveTypeParametersForCallableDescriptor(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
 

Field Detail

COPY_METHOD_NAME

public static final Name COPY_METHOD_NAME
Constructor Detail

DescriptorResolver

public DescriptorResolver(@NotNull
                          AnnotationResolver annotationResolver,
                          @NotNull
                          KotlinBuiltIns builtIns,
                          @NotNull
                          StorageManager storageManager,
                          @NotNull
                          TypeResolver typeResolver,
                          @NotNull
                          SupertypeLoopChecker supertypeLoopsResolver,
                          @NotNull
                          VariableTypeResolver variableTypeResolver,
                          @NotNull
                          ExpressionTypingServices expressionTypingServices)
Method Detail

resolveSupertypes

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

resolveSuperTypeListEntries

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

createComponentFunctionDescriptor

@NotNull
public static SimpleFunctionDescriptor createComponentFunctionDescriptor(int parameterIndex,
                                                                                 @NotNull
                                                                                 PropertyDescriptor property,
                                                                                 @NotNull
                                                                                 ValueParameterDescriptor parameter,
                                                                                 @NotNull
                                                                                 ClassDescriptor classDescriptor,
                                                                                 @NotNull
                                                                                 BindingTrace trace)

createCopyFunctionDescriptor

@NotNull
public static SimpleFunctionDescriptor createCopyFunctionDescriptor(@NotNull
                                                                            java.util.Collection<ValueParameterDescriptor> constructorParameters,
                                                                            @NotNull
                                                                            ClassDescriptor classDescriptor,
                                                                            @NotNull
                                                                            BindingTrace trace)

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(LexicalScope scope,
                                                                            FunctionDescriptor owner,
                                                                            KtParameter valueParameter,
                                                                            int index,
                                                                            KotlinType type,
                                                                            BindingTrace trace)

resolveTypeParametersForCallableDescriptor

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

createAndRecordPrimaryConstructorForObject

@NotNull
public static ConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(@Nullable
                                                                                           KtClassOrObject 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)

resolvePropertyDescriptor

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

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)

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)