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(LexicalScope scope,
BindingTrace trace,
com.intellij.psi.PsiElement reportErrorsOn,
ClassDescriptor target)
|
void |
checkNamesInConstraints(JetTypeParameterListOwner declaration,
DeclarationDescriptor descriptor,
LexicalScope scope,
BindingTrace trace)
|
static void |
checkUpperBoundType(JetTypeReference upperBound,
JetType upperBoundType,
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(LexicalScope scope)
|
static Modality |
getDefaultModality(DeclarationDescriptor containingDescriptor,
Visibility visibility,
boolean isBodyPresent)
|
static Visibility |
getDefaultVisibility(JetModifierListOwner modifierListOwner,
DeclarationDescriptor containingDescriptor)
|
static void |
registerFileInPackage(BindingTrace trace,
JetFile file)
|
java.util.Collection<JetType> |
resolveDelegationSpecifiers(LexicalScope extensibleScope,
java.util.List<JetDelegationSpecifier> delegationSpecifiers,
TypeResolver resolver,
BindingTrace trace,
boolean checkBounds)
|
void |
resolveGenericBounds(JetTypeParameterListOwner declaration,
DeclarationDescriptor descriptor,
LexicalScope scope,
java.util.List<TypeParameterDescriptorImpl> parameters,
BindingTrace trace)
|
VariableDescriptor |
resolveLocalVariableDescriptor(JetParameter parameter,
JetType type,
BindingTrace trace,
LexicalScope scope)
|
VariableDescriptor |
resolveLocalVariableDescriptor(LexicalScope scope,
JetParameter parameter,
BindingTrace trace)
|
VariableDescriptor |
resolveLocalVariableDescriptor(LexicalScope scope,
JetVariableDeclaration variable,
DataFlowInfo dataFlowInfo,
BindingTrace trace)
|
LocalVariableDescriptor |
resolveLocalVariableDescriptorWithType(LexicalScope scope,
JetVariableDeclaration variable,
JetType type,
BindingTrace trace)
|
PropertyDescriptor |
resolvePrimaryConstructorParameterToAProperty(ClassDescriptor classDescriptor,
ValueParameterDescriptor valueParameter,
LexicalScope scope,
JetParameter parameter,
BindingTrace trace)
|
PropertyDescriptor |
resolvePropertyDescriptor(DeclarationDescriptor containingDeclaration,
LexicalScope scope,
JetProperty property,
BindingTrace trace,
DataFlowInfo dataFlowInfo)
|
java.util.List<JetType> |
resolveSupertypes(LexicalScope scope,
ClassDescriptor classDescriptor,
JetClassOrObject jetClass,
BindingTrace trace)
|
JetType |
resolveTypeParameterExtendsBound(TypeParameterDescriptor typeParameterDescriptor,
JetTypeReference extendsBound,
LexicalScope scope,
BindingTrace trace)
|
java.util.List<TypeParameterDescriptorImpl> |
resolveTypeParametersForCallableDescriptor(DeclarationDescriptor containingDescriptor,
LexicalWritableScope extensibleScope,
java.util.List<JetTypeParameter> typeParameters,
BindingTrace trace)
|
ValueParameterDescriptorImpl |
resolveValueParameterDescriptor(LexicalScope scope,
FunctionDescriptor owner,
JetParameter valueParameter,
int index,
JetType type,
BindingTrace trace)
|
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(@NotNull
AnnotationResolver annotationResolver,
@NotNull
KotlinBuiltIns builtIns,
@NotNull
DelegatedPropertyResolver delegatedPropertyResolver,
@NotNull
ExpressionTypingServices expressionTypingServices,
@NotNull
StorageManager storageManager,
@NotNull
TypeResolver typeResolver,
@NotNull
ConstantExpressionEvaluator constantExpressionEvaluator)
resolveSupertypes
public java.util.List<JetType> resolveSupertypes(@NotNull
LexicalScope scope,
@NotNull
ClassDescriptor classDescriptor,
@NotNull
JetClassOrObject jetClass,
BindingTrace trace)
resolveDelegationSpecifiers
public java.util.Collection<JetType> resolveDelegationSpecifiers(LexicalScope extensibleScope,
java.util.List<JetDelegationSpecifier> 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(JetModifierListOwner modifierListOwner,
DeclarationDescriptor containingDescriptor)
getDefaultModality
public static Modality getDefaultModality(DeclarationDescriptor containingDescriptor,
Visibility visibility,
boolean isBodyPresent)
resolveValueParameterDescriptor
@NotNull
public ValueParameterDescriptorImpl resolveValueParameterDescriptor(LexicalScope scope,
FunctionDescriptor owner,
JetParameter valueParameter,
int index,
JetType type,
BindingTrace trace)
resolveTypeParametersForCallableDescriptor
public java.util.List<TypeParameterDescriptorImpl> resolveTypeParametersForCallableDescriptor(DeclarationDescriptor containingDescriptor,
LexicalWritableScope extensibleScope,
java.util.List<JetTypeParameter> typeParameters,
BindingTrace trace)
createAndRecordPrimaryConstructorForObject
@NotNull
public static ConstructorDescriptorImpl createAndRecordPrimaryConstructorForObject(@Nullable
JetClassOrObject object,
@NotNull
ClassDescriptor classDescriptor,
@NotNull
BindingTrace trace)
resolveTypeParameterExtendsBound
public JetType resolveTypeParameterExtendsBound(@NotNull
TypeParameterDescriptor typeParameterDescriptor,
@NotNull
JetTypeReference extendsBound,
LexicalScope scope,
BindingTrace trace)
resolveGenericBounds
public void resolveGenericBounds(@NotNull
JetTypeParameterListOwner 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
JetTypeParameter typeParameter)
checkNamesInConstraints
public void checkNamesInConstraints(@NotNull
JetTypeParameterListOwner declaration,
@NotNull
DeclarationDescriptor descriptor,
@NotNull
LexicalScope scope,
@NotNull
BindingTrace trace)
checkUpperBoundType
public static void checkUpperBoundType(JetTypeReference upperBound,
@NotNull
JetType upperBoundType,
BindingTrace trace)
resolveLocalVariableDescriptor
@NotNull
public VariableDescriptor resolveLocalVariableDescriptor(@NotNull
LexicalScope scope,
@NotNull
JetParameter parameter,
BindingTrace trace)
resolveLocalVariableDescriptor
public VariableDescriptor resolveLocalVariableDescriptor(@NotNull
JetParameter parameter,
@NotNull
JetType type,
BindingTrace trace,
@NotNull
LexicalScope scope)
resolveLocalVariableDescriptor
@NotNull
public VariableDescriptor resolveLocalVariableDescriptor(LexicalScope scope,
JetVariableDeclaration variable,
DataFlowInfo dataFlowInfo,
BindingTrace trace)
resolveLocalVariableDescriptorWithType
@NotNull
public LocalVariableDescriptor resolveLocalVariableDescriptorWithType(@NotNull
LexicalScope scope,
@NotNull
JetVariableDeclaration variable,
@Nullable
JetType type,
@NotNull
BindingTrace trace)
resolvePropertyDescriptor
@NotNull
public PropertyDescriptor resolvePropertyDescriptor(@NotNull
DeclarationDescriptor containingDeclaration,
@NotNull
LexicalScope scope,
@NotNull
JetProperty property,
@NotNull
BindingTrace trace,
@NotNull
DataFlowInfo dataFlowInfo)
resolvePrimaryConstructorParameterToAProperty
@NotNull
public PropertyDescriptor resolvePrimaryConstructorParameterToAProperty(@NotNull
ClassDescriptor classDescriptor,
@NotNull
ValueParameterDescriptor valueParameter,
@NotNull
LexicalScope 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
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
JetFile file)