Minor: add comments to LazyJavaStaticClassScope, LazyJavaPackageScope and StaticScopeForKotlinClass

This commit is contained in:
Zalim Bashorov
2015-11-02 21:16:17 +03:00
parent a6855116b8
commit 1e51e333ab
3 changed files with 13 additions and 6 deletions
@@ -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)
}
@@ -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()