Got rid of "namespace" term in descriptors module.

This commit is contained in:
Evgeny Gerashchenko
2014-01-09 23:34:37 +04:00
parent 997d3597a9
commit 7e7908b831
6 changed files with 9 additions and 9 deletions
@@ -463,7 +463,7 @@ public class DescriptorUtils {
}
/**
* @return true iff {@code descriptor}'s first non-class container is a namespace
* @return true iff {@code descriptor}'s first non-class container is a package
*/
public static boolean isTopLevelOrInnerClass(@NotNull ClassDescriptor descriptor) {
DeclarationDescriptor containing = descriptor.getContainingDeclaration();
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
public class SpecialNames {
public static final Name NO_NAME_PROVIDED = Name.special("<no name provided>");
public static final Name ROOT_NAMESPACE = Name.special("<root namespace>");
public static final Name ROOT_PACKAGE = Name.special("<root package>");
private static final String CLASS_OBJECT_FOR = "<class-object-for-";
@@ -240,8 +240,8 @@ public class WritableScopeImpl extends WritableScopeWithImports {
public VariableDescriptor getLocalVariable(@NotNull Name name) {
checkMayRead();
Map<Name, DeclarationDescriptor> variableClassOrNamespaceDescriptors = getVariableOrClassDescriptors();
DeclarationDescriptor descriptor = variableClassOrNamespaceDescriptors.get(name);
Map<Name, DeclarationDescriptor> variableOrClassDescriptors = getVariableOrClassDescriptors();
DeclarationDescriptor descriptor = variableOrClassDescriptors.get(name);
if (descriptor instanceof VariableDescriptor && !getPropertyGroups().get(name).contains(descriptor)) {
return (VariableDescriptor) descriptor;
}
@@ -368,8 +368,8 @@ public class WritableScopeImpl extends WritableScopeWithImports {
public ClassifierDescriptor getClassifier(@NotNull Name name) {
checkMayRead();
Map<Name, DeclarationDescriptor> variableClassOrNamespaceDescriptors = getVariableOrClassDescriptors();
DeclarationDescriptor descriptor = variableClassOrNamespaceDescriptors.get(name);
Map<Name, DeclarationDescriptor> variableOrClassDescriptors = getVariableOrClassDescriptors();
DeclarationDescriptor descriptor = variableOrClassDescriptors.get(name);
if (descriptor instanceof ClassifierDescriptor) return (ClassifierDescriptor) descriptor;
ClassifierDescriptor classifierDescriptor = getWorkerScope().getClassifier(name);