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, DelegatedPropertyResolver delegatedPropertyResolver, ExpressionTypingServices expressionTypingServices, StorageManager storageManager, TypeResolver typeResolver, ConstantExpressionEvaluator constantExpressionEvaluator)
           
 
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 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)
           
 java.util.Collection<KotlinType> resolveDelegationSpecifiers(LexicalScope extensibleScope, java.util.List<KtDelegationSpecifier> delegationSpecifiers, TypeResolver resolver, BindingTrace trace, boolean checkBounds)
           
 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)
           
 VariableDescriptor resolveLocalVariableDescriptor(LexicalScope scope, KtVariableDeclaration variable, DataFlowInfo dataFlowInfo, BindingTrace trace)
           
 LocalVariableDescriptor resolveLocalVariableDescriptorWithType(LexicalScope scope, KtVariableDeclaration variable, KotlinType type, 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.List<KotlinType> resolveSupertypes(LexicalScope scope, ClassDescriptor classDescriptor, KtClassOrObject jetClass, BindingTrace trace)
           
 KotlinType resolveTypeParameterExtendsBound(TypeParameterDescriptor typeParameterDescriptor, KtTypeReference extendsBound, LexicalScope scope, 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
                          DelegatedPropertyResolver delegatedPropertyResolver,
                          @NotNull
                          ExpressionTypingServices expressionTypingServices,
                          @NotNull
                          StorageManager storageManager,
                          @NotNull
                          TypeResolver typeResolver,
                          @NotNull
                          ConstantExpressionEvaluator constantExpressionEvaluator)
Method Detail

resolveSupertypes

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

resolveDelegationSpecifiers

public java.util.Collection<KotlinType> resolveDelegationSpecifiers(LexicalScope extensibleScope,
                                                                    java.util.List<KtDelegationSpecifier> 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)

resolveTypeParameterExtendsBound

public KotlinType resolveTypeParameterExtendsBound(@NotNull
                                                   TypeParameterDescriptor typeParameterDescriptor,
                                                   @NotNull
                                                   KtTypeReference extendsBound,
                                                   LexicalScope scope,
                                                   BindingTrace trace)

resolveGenericBounds

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

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)

resolveLocalVariableDescriptor

@NotNull
public VariableDescriptor resolveLocalVariableDescriptor(LexicalScope scope,
                                                                 KtVariableDeclaration variable,
                                                                 DataFlowInfo dataFlowInfo,
                                                                 BindingTrace trace)

resolveLocalVariableDescriptorWithType

@NotNull
public LocalVariableDescriptor resolveLocalVariableDescriptorWithType(@NotNull
                                                                              LexicalScope scope,
                                                                              @NotNull
                                                                              KtVariableDeclaration variable,
                                                                              @Nullable
                                                                              KotlinType type,
                                                                              @NotNull
                                                                              BindingTrace trace)

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)