Revert "Add method for getting all classifiers with given name from the scope"
This reverts commit 97759f5bb7.
This commit is contained in:
-2
@@ -272,8 +272,6 @@ public abstract class LazyJavaMemberScope(
|
||||
override fun getLocalVariable(name: Name): VariableDescriptor? = null
|
||||
override fun getDeclarationsByLabel(labelName: LabelName) = listOf<DeclarationDescriptor>()
|
||||
|
||||
override fun getClassifiers(name: Name) = emptyOrSingletonList(getClassifier(name))
|
||||
|
||||
override fun getOwnDeclaredDescriptors() = getAllDescriptors()
|
||||
override fun getAllDescriptors() = allDescriptors()
|
||||
|
||||
|
||||
@@ -55,12 +55,6 @@ public abstract class AbstractScopeAdapter implements JetScope {
|
||||
return getWorkerScope().getClassifier(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
return getWorkerScope().getClassifiers(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getProperties(@NotNull Name name) {
|
||||
|
||||
@@ -51,12 +51,6 @@ public class ChainedScope implements JetScope {
|
||||
return getFirstMatch(scopeChain, name, CLASSIFIER_DESCRIPTOR_SCOPE_SELECTOR);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
return getFromAllScopes(scopeChain, name, NAMED_CLASSIFIERS_SCOPE_SELECTOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageViewDescriptor getPackage(@NotNull Name name) {
|
||||
return getFirstMatch(scopeChain, name, PACKAGE_SCOPE_SELECTOR);
|
||||
|
||||
@@ -66,12 +66,6 @@ public class FilteringScope implements JetScope {
|
||||
return filterDescriptor(workerScope.getClassifier(name));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
return Collections2.filter(workerScope.getClassifiers(name), predicate);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getProperties(@NotNull Name name) {
|
||||
|
||||
@@ -53,10 +53,6 @@ public interface JetScope {
|
||||
@Nullable
|
||||
ClassifierDescriptor getClassifier(@NotNull Name name);
|
||||
|
||||
@NotNull
|
||||
@ReadOnly
|
||||
Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name);
|
||||
|
||||
@Nullable
|
||||
PackageViewDescriptor getPackage(@NotNull Name name);
|
||||
|
||||
|
||||
@@ -34,12 +34,6 @@ public abstract class JetScopeImpl implements JetScope {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getProperties(@NotNull Name name) {
|
||||
|
||||
@@ -112,15 +112,6 @@ public class JetScopeSelectorUtil {
|
||||
}
|
||||
};
|
||||
|
||||
public static final ScopeByNameMultiSelector<ClassifierDescriptor> NAMED_CLASSIFIERS_SCOPE_SELECTOR =
|
||||
new ScopeByNameMultiSelector<ClassifierDescriptor>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> get(@NotNull JetScope scope, @NotNull Name name) {
|
||||
return scope.getClassifiers(name);
|
||||
}
|
||||
};
|
||||
|
||||
public static final ScopeDescriptorSelector<DeclarationDescriptor> ALL_DESCRIPTORS_SCOPE_SELECTOR =
|
||||
new ScopeDescriptorSelector<DeclarationDescriptor>() {
|
||||
@NotNull
|
||||
|
||||
@@ -98,12 +98,6 @@ public class SubstitutingScope implements JetScope {
|
||||
return substitute(workerScope.getClassifier(name));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
return substitute(workerScope.getClassifiers(name));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<FunctionDescriptor> getFunctions(@NotNull Name name) {
|
||||
|
||||
@@ -85,12 +85,6 @@ public class ErrorUtils {
|
||||
return ERROR_CLASS;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
return ERROR_CLASSIFIER_GROUP;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Set<VariableDescriptor> getProperties(@NotNull Name name) {
|
||||
@@ -167,12 +161,6 @@ public class ErrorUtils {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<ClassifierDescriptor> getClassifiers(@NotNull Name name) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public PackageViewDescriptor getPackage(@NotNull Name name) {
|
||||
@@ -266,7 +254,6 @@ public class ErrorUtils {
|
||||
ERROR_PROPERTY_TYPE,
|
||||
CallableMemberDescriptor.Kind.DECLARATION);
|
||||
private static final Set<VariableDescriptor> ERROR_PROPERTY_GROUP = Collections.singleton(ERROR_PROPERTY);
|
||||
private static final Set<ClassifierDescriptor> ERROR_CLASSIFIER_GROUP = Collections.<ClassifierDescriptor>singleton(ERROR_CLASS);
|
||||
|
||||
@NotNull
|
||||
private static SimpleFunctionDescriptor createErrorFunction(@NotNull ErrorScope ownerScope) {
|
||||
|
||||
Reference in New Issue
Block a user