org.jetbrains.kotlin.resolve
Class DescriptorResolver
java.lang.Object
org.jetbrains.kotlin.resolve.DescriptorResolver
public class DescriptorResolver
- extends java.lang.Object
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 void |
checkConflictingUpperBounds(BindingTrace trace,
TypeParameterDescriptor parameter,
JetTypeParameter typeParameter)
|
static boolean |
checkHasOuterClassInstance(JetScope scope,
BindingTrace trace,
com.intellij.psi.PsiElement reportErrorsOn,
ClassDescriptor target)
|
void |
checkNamesInConstraints(JetTypeParameterListOwner declaration,
DeclarationDescriptor descriptor,
JetScope scope,
BindingTrace trace)
|
static void |
checkParameterHasNoModifier(BindingTrace trace,
JetParameter parameter)
|
static void |
checkParameterHasNoValOrVar(BindingTrace trace,
JetParameter parameter,
DiagnosticFactory1<com.intellij.psi.PsiElement,JetKeywordToken> diagnosticFactory)
|
static void |
checkUpperBoundType(JetTypeReference upperBound,
JetType upperBoundType,
boolean isDefaultObjectConstraint,
BindingTrace trace)
|
static ConstructorDescriptorImpl |
createAndRecordPrimaryConstructorForObject(JetClassOrObject 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(JetScope scope)
|
static Modality |
getDefaultModality(DeclarationDescriptor containingDescriptor,
boolean isBodyPresent)
|
static Visibility |
getDefaultVisibility(JetModifierListOwner modifierListOwner,
DeclarationDescriptor containingDescriptor)
|
static void |
registerFileInPackage(BindingTrace trace,
JetFile file)
|
static void |
reportUnsupportedDefaultObjectConstraint(BindingTrace trace,
JetTypeConstraint constraint)
|
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,
DeclarationDescriptor descriptor,
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(TopDownAnalysisParameters topDownAnalysisParameters,
JetClass classElement,
MutableClassDescriptor descriptor,
BindingTrace trace)
|
static void |
resolvePackageHeader(JetPackageDirective packageDirective,
ModuleDescriptor module,
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 |
setBuiltIns(KotlinBuiltIns builtIns)
|
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 |
COPY_METHOD_NAME
public static final Name COPY_METHOD_NAME
DescriptorResolver
public DescriptorResolver()
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)
setBuiltIns
@Inject
public void setBuiltIns(@NotNull
KotlinBuiltIns builtIns)
resolveMutableClassDescriptor
public void resolveMutableClassDescriptor(@NotNull
TopDownAnalysisParameters topDownAnalysisParameters,
@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
JetClassOrObject object,
@NotNull
ClassDescriptor classDescriptor,
@NotNull
BindingTrace trace)
resolveGenericBounds
public void resolveGenericBounds(@NotNull
JetTypeParameterListOwner declaration,
@NotNull
DeclarationDescriptor descriptor,
JetScope scope,
java.util.List<TypeParameterDescriptorImpl> parameters,
BindingTrace trace)
checkConflictingUpperBounds
public static void checkConflictingUpperBounds(@NotNull
BindingTrace trace,
@NotNull
TypeParameterDescriptor parameter,
@NotNull
JetTypeParameter typeParameter)
checkNamesInConstraints
public void checkNamesInConstraints(@NotNull
JetTypeParameterListOwner declaration,
@NotNull
DeclarationDescriptor descriptor,
@NotNull
JetScope scope,
@NotNull
BindingTrace trace)
reportUnsupportedDefaultObjectConstraint
public static void reportUnsupportedDefaultObjectConstraint(BindingTrace trace,
JetTypeConstraint constraint)
checkUpperBoundType
public static void checkUpperBoundType(JetTypeReference upperBound,
@NotNull
JetType upperBoundType,
boolean isDefaultObjectConstraint,
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,
@NotNull
BindingTrace trace)
checkBounds
public static void checkBounds(@NotNull
JetTypeReference jetTypeArgument,
@NotNull
JetType typeArgument,
@NotNull
TypeParameterDescriptor typeParameterDescriptor,
@NotNull
TypeSubstitutor substitutor,
@NotNull
BindingTrace trace)
checkHasOuterClassInstance
public static boolean checkHasOuterClassInstance(@NotNull
JetScope scope,
@NotNull
BindingTrace trace,
@NotNull
com.intellij.psi.PsiElement reportErrorsOn,
@NotNull
ClassDescriptor target)
getContainingClass
@Nullable
public static ClassDescriptor getContainingClass(@NotNull
JetScope scope)
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)
resolvePackageHeader
public static void resolvePackageHeader(@NotNull
JetPackageDirective packageDirective,
@NotNull
ModuleDescriptor module,
@NotNull
BindingTrace trace)
registerFileInPackage
public static void registerFileInPackage(@NotNull
BindingTrace trace,
@NotNull
JetFile file)