org.jetbrains.jet.lang.resolve
Class DescriptorResolver

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

public class DescriptorResolver
extends java.lang.Object


Field Summary
static java.lang.String COMPONENT_FUNCTION_NAME_PREFIX
           
static Name COPY_METHOD_NAME
           
 
Constructor Summary
DescriptorResolver()
           
 
Method Summary
static void checkBounds(JetTypeReference typeReference, JetType type, BindingTrace trace)
           
static void checkBounds(JetTypeReference jetTypeArgument, JetType typeArgument, TypeParameterDescriptor typeParameterDescriptor, TypeSubstitutor substitutor, BindingTrace trace)
           
static boolean checkHasOuterClassInstance(JetScope scope, BindingTrace trace, com.intellij.psi.PsiElement reportErrorsOn, ClassDescriptor target)
           
static void checkParameterHasNoModifier(BindingTrace trace, JetParameter parameter)
           
static void checkParameterHasNoValOrVar(BindingTrace trace, JetParameter parameter, DiagnosticFactory1<com.intellij.psi.PsiElement,JetKeywordToken> diagnosticFactory)
           
static ConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(com.intellij.psi.PsiElement 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 SimpleFunctionDescriptor createEnumClassObjectValueOfMethod(ClassDescriptor classObject, BindingTrace trace)
           
static SimpleFunctionDescriptor createEnumClassObjectValuesMethod(ClassDescriptor classObject, BindingTrace trace)
           
static Modality getDefaultModality(DeclarationDescriptor containingDescriptor, boolean isBodyPresent)
           
static Visibility getDefaultVisibility(JetModifierListOwner modifierListOwner, DeclarationDescriptor containingDescriptor)
           
 java.util.Collection<JetType> resolveDelegationSpecifiers(JetScope extensibleScope, java.util.List<JetDelegationSpecifier> delegationSpecifiers, TypeResolver resolver, BindingTrace trace, boolean checkBounds)
           
 SimpleFunctionDescriptor resolveFunctionDescriptor(DeclarationDescriptor containingDescriptor, JetScope scope, JetNamedFunction function, BindingTrace trace, DataFlowInfo dataFlowInfo)
           
 SimpleFunctionDescriptor resolveFunctionDescriptorWithAnnotationArguments(DeclarationDescriptor containingDescriptor, JetScope scope, JetNamedFunction function, BindingTrace trace, DataFlowInfo dataFlowInfo)
           
 void resolveGenericBounds(JetTypeParameterListOwner declaration, JetScope scope, java.util.List<TypeParameterDescriptorImpl> parameters, BindingTrace trace)
           
 VariableDescriptor resolveLocalVariableDescriptor(JetParameter parameter, JetType type, BindingTrace trace, JetScope scope)
           
 VariableDescriptor resolveLocalVariableDescriptor(JetScope scope, JetParameter parameter, BindingTrace trace)
           
 VariableDescriptor resolveLocalVariableDescriptor(JetScope scope, JetVariableDeclaration variable, DataFlowInfo dataFlowInfo, BindingTrace trace)
           
 VariableDescriptorImpl resolveLocalVariableDescriptorWithType(JetScope scope, JetVariableDeclaration variable, JetType type, BindingTrace trace)
           
 void resolveMutableClassDescriptor(JetClass classElement, MutableClassDescriptor descriptor, BindingTrace trace)
           
 ConstructorDescriptorImpl resolvePrimaryConstructorDescriptor(JetScope scope, ClassDescriptor classDescriptor, JetClass classElement, BindingTrace trace)
           
 PropertyDescriptor resolvePrimaryConstructorParameterToAProperty(ClassDescriptor classDescriptor, ValueParameterDescriptor valueParameter, JetScope scope, JetParameter parameter, BindingTrace trace)
           
 PropertyDescriptor resolvePropertyDescriptor(DeclarationDescriptor containingDeclaration, JetScope scope, JetProperty property, BindingTrace trace, DataFlowInfo dataFlowInfo)
           
 java.util.List<JetType> resolveSupertypes(JetScope scope, ClassDescriptor classDescriptor, JetClassOrObject jetClass, BindingTrace trace)
           
 void resolveSupertypesForMutableClassDescriptor(JetClassOrObject jetClass, MutableClassDescriptor descriptor, BindingTrace trace)
           
 java.util.List<TypeParameterDescriptorImpl> resolveTypeParametersForCallableDescriptor(DeclarationDescriptor containingDescriptor, WritableScope extensibleScope, java.util.List<JetTypeParameter> typeParameters, BindingTrace trace)
           
 ValueParameterDescriptorImpl resolveValueParameterDescriptor(JetScope scope, DeclarationDescriptor declarationDescriptor, JetParameter valueParameter, int index, JetType type, BindingTrace trace)
           
 ValueParameterDescriptorImpl resolveValueParameterDescriptorWithAnnotationArguments(JetScope scope, DeclarationDescriptor declarationDescriptor, JetParameter valueParameter, int index, JetType type, BindingTrace trace)
           
 void setAnnotationResolver(AnnotationResolver annotationResolver)
           
 void setDelegatedPropertyResolver(DelegatedPropertyResolver delegatedPropertyResolver)
           
 void setExpressionTypingServices(ExpressionTypingServices expressionTypingServices)
           
 void setStorageManager(StorageManager storageManager)
           
 void setTypeResolver(TypeResolver typeResolver)
           
 
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

COMPONENT_FUNCTION_NAME_PREFIX

public static final java.lang.String COMPONENT_FUNCTION_NAME_PREFIX
See Also:
Constant Field Values
Constructor Detail

DescriptorResolver

public DescriptorResolver()
Method Detail

setTypeResolver

@Inject
public void setTypeResolver(@NotNull
                                   TypeResolver typeResolver)

setAnnotationResolver

@Inject
public void setAnnotationResolver(@NotNull
                                         AnnotationResolver annotationResolver)

setExpressionTypingServices

@Inject
public void setExpressionTypingServices(@NotNull
                                               ExpressionTypingServices expressionTypingServices)

setDelegatedPropertyResolver

@Inject
public void setDelegatedPropertyResolver(@NotNull
                                                DelegatedPropertyResolver delegatedPropertyResolver)

setStorageManager

@Inject
public void setStorageManager(@NotNull
                                     StorageManager storageManager)

resolveMutableClassDescriptor

public void resolveMutableClassDescriptor(@NotNull
                                          JetClass classElement,
                                          @NotNull
                                          MutableClassDescriptor descriptor,
                                          BindingTrace trace)

resolveSupertypesForMutableClassDescriptor

public void resolveSupertypesForMutableClassDescriptor(@NotNull
                                                       JetClassOrObject jetClass,
                                                       @NotNull
                                                       MutableClassDescriptor descriptor,
                                                       BindingTrace trace)

resolveSupertypes

public java.util.List<JetType> resolveSupertypes(@NotNull
                                                 JetScope scope,
                                                 @NotNull
                                                 ClassDescriptor classDescriptor,
                                                 @NotNull
                                                 JetClassOrObject jetClass,
                                                 BindingTrace trace)

resolveDelegationSpecifiers

public java.util.Collection<JetType> resolveDelegationSpecifiers(JetScope extensibleScope,
                                                                 java.util.List<JetDelegationSpecifier> delegationSpecifiers,
                                                                 @NotNull
                                                                 TypeResolver resolver,
                                                                 BindingTrace trace,
                                                                 boolean checkBounds)

resolveFunctionDescriptorWithAnnotationArguments

@NotNull
public SimpleFunctionDescriptor resolveFunctionDescriptorWithAnnotationArguments(@NotNull
                                                                                         DeclarationDescriptor containingDescriptor,
                                                                                         @NotNull
                                                                                         JetScope scope,
                                                                                         @NotNull
                                                                                         JetNamedFunction function,
                                                                                         @NotNull
                                                                                         BindingTrace trace,
                                                                                         @NotNull
                                                                                         DataFlowInfo dataFlowInfo)

resolveFunctionDescriptor

@NotNull
public SimpleFunctionDescriptor resolveFunctionDescriptor(@NotNull
                                                                  DeclarationDescriptor containingDescriptor,
                                                                  @NotNull
                                                                  JetScope scope,
                                                                  @NotNull
                                                                  JetNamedFunction function,
                                                                  @NotNull
                                                                  BindingTrace trace,
                                                                  @NotNull
                                                                  DataFlowInfo dataFlowInfo)

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(JetModifierListOwner modifierListOwner,
                                              DeclarationDescriptor containingDescriptor)

getDefaultModality

public static Modality getDefaultModality(DeclarationDescriptor containingDescriptor,
                                          boolean isBodyPresent)

resolveValueParameterDescriptor

@NotNull
public ValueParameterDescriptorImpl resolveValueParameterDescriptor(JetScope scope,
                                                                            DeclarationDescriptor declarationDescriptor,
                                                                            JetParameter valueParameter,
                                                                            int index,
                                                                            JetType type,
                                                                            BindingTrace trace)

resolveValueParameterDescriptorWithAnnotationArguments

@NotNull
public ValueParameterDescriptorImpl resolveValueParameterDescriptorWithAnnotationArguments(JetScope scope,
                                                                                                   DeclarationDescriptor declarationDescriptor,
                                                                                                   JetParameter valueParameter,
                                                                                                   int index,
                                                                                                   JetType type,
                                                                                                   BindingTrace trace)

resolveTypeParametersForCallableDescriptor

public java.util.List<TypeParameterDescriptorImpl> resolveTypeParametersForCallableDescriptor(DeclarationDescriptor containingDescriptor,
                                                                                              WritableScope extensibleScope,
                                                                                              java.util.List<JetTypeParameter> typeParameters,
                                                                                              BindingTrace trace)

createAndRecordPrimaryConstructorForObject

@NotNull
public static ConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(@Nullable
                                                                                           com.intellij.psi.PsiElement object,
                                                                                           @NotNull
                                                                                           ClassDescriptor classDescriptor,
                                                                                           @NotNull
                                                                                           BindingTrace trace)

resolveGenericBounds

public void resolveGenericBounds(@NotNull
                                 JetTypeParameterListOwner declaration,
                                 JetScope scope,
                                 java.util.List<TypeParameterDescriptorImpl> parameters,
                                 BindingTrace trace)

resolveLocalVariableDescriptor

@NotNull
public VariableDescriptor resolveLocalVariableDescriptor(@NotNull
                                                                 JetScope scope,
                                                                 @NotNull
                                                                 JetParameter parameter,
                                                                 BindingTrace trace)

resolveLocalVariableDescriptor

public VariableDescriptor resolveLocalVariableDescriptor(@NotNull
                                                         JetParameter parameter,
                                                         @NotNull
                                                         JetType type,
                                                         BindingTrace trace,
                                                         @NotNull
                                                         JetScope scope)

resolveLocalVariableDescriptor

@NotNull
public VariableDescriptor resolveLocalVariableDescriptor(JetScope scope,
                                                                 JetVariableDeclaration variable,
                                                                 DataFlowInfo dataFlowInfo,
                                                                 BindingTrace trace)

resolveLocalVariableDescriptorWithType

@NotNull
public VariableDescriptorImpl resolveLocalVariableDescriptorWithType(@NotNull
                                                                             JetScope scope,
                                                                             @NotNull
                                                                             JetVariableDeclaration variable,
                                                                             @Nullable
                                                                             JetType type,
                                                                             @NotNull
                                                                             BindingTrace trace)

resolvePropertyDescriptor

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

resolvePrimaryConstructorDescriptor

@Nullable
public ConstructorDescriptorImpl resolvePrimaryConstructorDescriptor(@NotNull
                                                                              JetScope scope,
                                                                              @NotNull
                                                                              ClassDescriptor classDescriptor,
                                                                              @NotNull
                                                                              JetClass classElement,
                                                                              BindingTrace trace)

resolvePrimaryConstructorParameterToAProperty

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

checkBounds

public static void checkBounds(@NotNull
                               JetTypeReference typeReference,
                               @NotNull
                               JetType type,
                               BindingTrace trace)

checkBounds

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

createEnumClassObjectValuesMethod

@NotNull
public static SimpleFunctionDescriptor createEnumClassObjectValuesMethod(@NotNull
                                                                                 ClassDescriptor classObject,
                                                                                 @NotNull
                                                                                 BindingTrace trace)

createEnumClassObjectValueOfMethod

@NotNull
public static SimpleFunctionDescriptor createEnumClassObjectValueOfMethod(@NotNull
                                                                                  ClassDescriptor classObject,
                                                                                  @NotNull
                                                                                  BindingTrace trace)

checkHasOuterClassInstance

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

checkParameterHasNoValOrVar

public static void checkParameterHasNoValOrVar(@NotNull
                                               BindingTrace trace,
                                               @NotNull
                                               JetParameter parameter,
                                               @NotNull
                                               DiagnosticFactory1<com.intellij.psi.PsiElement,JetKeywordToken> diagnosticFactory)

checkParameterHasNoModifier

public static void checkParameterHasNoModifier(@NotNull
                                               BindingTrace trace,
                                               @NotNull
                                               JetParameter parameter)