Minor: add comments to LazyJavaStaticClassScope, LazyJavaPackageScope and StaticScopeForKotlinClass
This commit is contained in:
+2
@@ -107,11 +107,13 @@ public class LazyJavaPackageScope(
|
||||
}
|
||||
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<PropertyDescriptor> {
|
||||
// We should track lookups here because this scope can be used for kotlin packages too (if it doesn't contain toplevel properties nor functions).
|
||||
recordLookup(name, location)
|
||||
return deserializedPackageScope().getProperties(name, NoLookupLocation.FOR_ALREADY_TRACKED)
|
||||
}
|
||||
|
||||
override fun getFunctions(name: Name, location: LookupLocation): List<FunctionDescriptor> {
|
||||
// We should track lookups here because this scope can be used for kotlin packages too (if it doesn't contain toplevel properties nor functions).
|
||||
recordLookup(name, location)
|
||||
return deserializedPackageScope().getFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED) + super.getFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED)
|
||||
}
|
||||
|
||||
+4
-1
@@ -63,7 +63,10 @@ public class LazyJavaStaticClassScope(
|
||||
memberIndex().getAllFieldNames() + (if (jClass.isEnum) listOf(DescriptorUtils.ENUM_VALUES) else emptyList())
|
||||
|
||||
override fun getClassNames(kindFilter: DescriptorKindFilter, nameFilter: (Name) -> Boolean): Collection<Name> = listOf()
|
||||
override fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? = null
|
||||
override fun getClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? {
|
||||
// We don't need to track lookups here because we find nested/inner classes in LazyJavaClassMemberScope
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getSubPackages(): Collection<FqName> = listOf()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user