UsageLocation -> LookupLocation

This commit is contained in:
Zalim Bashorov
2015-08-04 22:03:20 +03:00
parent 96696c6846
commit 2aa4c383cd
52 changed files with 190 additions and 194 deletions
@@ -40,7 +40,7 @@ import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.resolve.DescriptorFactory
import org.jetbrains.kotlin.resolve.DescriptorUtils
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.UsageLocation
import org.jetbrains.kotlin.resolve.scopes.LookupLocation
import org.jetbrains.kotlin.types.JetType
import org.jetbrains.kotlin.types.TypeUtils
import org.jetbrains.kotlin.utils.*
@@ -285,7 +285,7 @@ public class LazyJavaClassMemberScope(
override fun getDispatchReceiverParameter(): ReceiverParameterDescriptor? =
DescriptorUtils.getDispatchReceiverParameterIfNeeded(getContainingDeclaration())
override fun getClassifier(name: Name, location: UsageLocation): ClassifierDescriptor? = nestedClasses(name)
override fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? = nestedClasses(name)
override fun getClassNames(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection<Name>
= nestedClassIndex().keySet() + enumEntryIndex().keySet()
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.name.SpecialNames
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.JetScope
import org.jetbrains.kotlin.resolve.scopes.UsageLocation
import org.jetbrains.kotlin.resolve.scopes.LookupLocation
import org.jetbrains.kotlin.utils.addIfNotNull
public class LazyJavaPackageScope(
@@ -76,11 +76,11 @@ public class LazyJavaPackageScope(
}
}
override fun getClassifier(name: Name, location: UsageLocation): ClassifierDescriptor? =
override fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? =
if (SpecialNames.isSafeIdentifier(name)) classes(name) else null
override fun getProperties(name: Name, location: UsageLocation) = deserializedPackageScope().getProperties(name, location)
override fun getFunctions(name: Name, location: UsageLocation) = deserializedPackageScope().getFunctions(name, location) + super.getFunctions(name, location)
override fun getProperties(name: Name, location: LookupLocation) = deserializedPackageScope().getProperties(name, location)
override fun getFunctions(name: Name, location: LookupLocation) = deserializedPackageScope().getFunctions(name, location) + super.getFunctions(name, location)
override fun addExtraDescriptors(result: MutableSet<DeclarationDescriptor>,
kindFilter: DescriptorKindFilter,
@@ -40,7 +40,7 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindExclude.NonExtensions
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.JetScope
import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl
import org.jetbrains.kotlin.resolve.scopes.UsageLocation
import org.jetbrains.kotlin.resolve.scopes.LookupLocation
import org.jetbrains.kotlin.storage.NotNullLazyValue
import org.jetbrains.kotlin.types.JetType
import org.jetbrains.kotlin.types.TypeUtils
@@ -210,7 +210,7 @@ public abstract class LazyJavaScope(
return ResolvedValueParameters(descriptors, synthesizedNames)
}
override fun getFunctions(name: Name, location: UsageLocation) = functions(name)
override fun getFunctions(name: Name, location: LookupLocation) = functions(name)
protected open fun getFunctionNames(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection<Name>
= memberIndex().getMethodNames(nameFilter)
@@ -289,7 +289,7 @@ public abstract class LazyJavaScope(
return propertyType
}
override fun getProperties(name: Name, location: UsageLocation): Collection<VariableDescriptor> = properties(name)
override fun getProperties(name: Name, location: LookupLocation): Collection<VariableDescriptor> = properties(name)
override fun getOwnDeclaredDescriptors() = getDescriptors()
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.resolve.DescriptorFactory.createEnumValueOfMethod
import org.jetbrains.kotlin.resolve.DescriptorFactory.createEnumValuesMethod
import org.jetbrains.kotlin.resolve.DescriptorUtils
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.UsageLocation
import org.jetbrains.kotlin.resolve.scopes.LookupLocation
import org.jetbrains.kotlin.utils.addIfNotNull
public class LazyJavaStaticClassScope(
@@ -58,7 +58,7 @@ public class LazyJavaStaticClassScope(
memberIndex().getAllFieldNames()
override fun getClassNames(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection<Name> = listOf()
override fun getClassifier(name: Name, location: UsageLocation): ClassifierDescriptor? = null
override fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? = null
override fun getSubPackages(): Collection<FqName> = listOf()