Removed obsolete classes.
This commit is contained in:
@@ -18,7 +18,6 @@ package org.jetbrains.jet.lang.resolve;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor;
|
import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor;
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.NamespaceDescriptorImpl;
|
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public interface NamespaceFactory {
|
public interface NamespaceFactory {
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor;
|
|||||||
import org.jetbrains.jet.lang.descriptors.ScriptDescriptor;
|
import org.jetbrains.jet.lang.descriptors.ScriptDescriptor;
|
||||||
import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor;
|
import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor;
|
||||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.NamespaceDescriptorImpl;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.ValueParameterDescriptorImpl;
|
import org.jetbrains.jet.lang.descriptors.impl.ValueParameterDescriptorImpl;
|
||||||
import org.jetbrains.jet.lang.parsing.JetScriptDefinition;
|
import org.jetbrains.jet.lang.parsing.JetScriptDefinition;
|
||||||
import org.jetbrains.jet.lang.parsing.JetScriptDefinitionProvider;
|
import org.jetbrains.jet.lang.parsing.JetScriptDefinitionProvider;
|
||||||
|
|||||||
+1
-3
@@ -22,16 +22,14 @@ import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
|||||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptorVisitor;
|
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptorVisitor;
|
||||||
import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
|
import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
|
||||||
import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor;
|
import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor;
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.DeclarationDescriptorImpl;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.NamespaceDescriptorParent;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||||
|
import org.jetbrains.jet.lang.descriptors.impl.DeclarationDescriptorImpl;
|
||||||
import org.jetbrains.jet.lang.resolve.java.resolver.JavaPackageFragmentProvider;
|
import org.jetbrains.jet.lang.resolve.java.resolver.JavaPackageFragmentProvider;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||||
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class JavaPackageFragmentDescriptor extends DeclarationDescriptorImpl implements PackageFragmentDescriptor {
|
public class JavaPackageFragmentDescriptor extends DeclarationDescriptorImpl implements PackageFragmentDescriptor {
|
||||||
private final JavaPackageFragmentProvider provider;
|
private final JavaPackageFragmentProvider provider;
|
||||||
|
|||||||
@@ -19,14 +19,13 @@ package org.jetbrains.jet.lang.descriptors;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.PlatformToKotlinClassMap;
|
import org.jetbrains.jet.lang.PlatformToKotlinClassMap;
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.NamespaceDescriptorParent;
|
|
||||||
import org.jetbrains.jet.lang.resolve.ImportPath;
|
import org.jetbrains.jet.lang.resolve.ImportPath;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ModuleDescriptor extends DeclarationDescriptor, NamespaceDescriptorParent {
|
public interface ModuleDescriptor extends DeclarationDescriptor {
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
DeclarationDescriptor getContainingDeclaration();
|
DeclarationDescriptor getContainingDeclaration();
|
||||||
|
|||||||
@@ -17,19 +17,14 @@
|
|||||||
package org.jetbrains.jet.lang.descriptors;
|
package org.jetbrains.jet.lang.descriptors;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.descriptors.impl.NamespaceDescriptorParent;
|
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface NamespaceDescriptor extends ClassOrNamespaceDescriptor, NamespaceDescriptorParent {
|
public interface NamespaceDescriptor extends ClassOrNamespaceDescriptor {
|
||||||
@NotNull
|
@NotNull
|
||||||
JetScope getMemberScope();
|
JetScope getMemberScope();
|
||||||
|
|
||||||
@Override
|
|
||||||
@NotNull
|
|
||||||
NamespaceDescriptorParent getContainingDeclaration();
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
FqName getFqName();
|
FqName getFqName();
|
||||||
}
|
}
|
||||||
|
|||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2013 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.jet.lang.descriptors.impl;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptorVisitor;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
|
||||||
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public abstract class AbstractNamespaceDescriptorImpl extends DeclarationDescriptorNonRootImpl implements NamespaceDescriptor {
|
|
||||||
public AbstractNamespaceDescriptorImpl(
|
|
||||||
@NotNull NamespaceDescriptorParent containingDeclaration,
|
|
||||||
List<AnnotationDescriptor> annotations,
|
|
||||||
@NotNull Name name) {
|
|
||||||
|
|
||||||
super(containingDeclaration, annotations, name);
|
|
||||||
|
|
||||||
boolean rootAccordingToContainer = containingDeclaration instanceof ModuleDescriptor;
|
|
||||||
if (rootAccordingToContainer != name.isSpecial()) {
|
|
||||||
throw new IllegalStateException("something is wrong, name: " + name + ", container: " + containingDeclaration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@NotNull
|
|
||||||
public NamespaceDescriptorParent getContainingDeclaration() {
|
|
||||||
return (NamespaceDescriptorParent) super.getContainingDeclaration();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public NamespaceDescriptor substitute(@NotNull TypeSubstitutor substitutor) {
|
|
||||||
throw new UnsupportedOperationException("This operation does not make sense for a namespace");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <R, D> R accept(DeclarationDescriptorVisitor<R, D> visitor, D data) {
|
|
||||||
throw new UnsupportedOperationException("namespaces are retired");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-67
@@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2013 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.jet.lang.descriptors.impl;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
|
||||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
|
||||||
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public class NamespaceDescriptorImpl extends AbstractNamespaceDescriptorImpl {
|
|
||||||
|
|
||||||
private WritableScope memberScope;
|
|
||||||
private NamespaceLikeBuilder builder;
|
|
||||||
|
|
||||||
public NamespaceDescriptorImpl(@NotNull NamespaceDescriptorParent containingDeclaration,
|
|
||||||
@NotNull List<AnnotationDescriptor> annotations,
|
|
||||||
@NotNull Name name) {
|
|
||||||
super(containingDeclaration, annotations, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initialize(@NotNull WritableScope memberScope) {
|
|
||||||
if (this.memberScope != null) {
|
|
||||||
throw new IllegalStateException("Namespace member scope reinitialize");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.memberScope = memberScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@NotNull
|
|
||||||
public WritableScope getMemberScope() {
|
|
||||||
return memberScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
public FqName getFqName() {
|
|
||||||
return DescriptorUtils.getFQName(this).toSafe();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public NamespaceLikeBuilder getBuilder() {
|
|
||||||
if (builder == null) {
|
|
||||||
builder = new ScopeBasedNamespaceLikeBuilder(this, getMemberScope());
|
|
||||||
}
|
|
||||||
return builder;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2013 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.jet.lang.descriptors.impl;
|
|
||||||
|
|
||||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
|
||||||
|
|
||||||
// TODO 2 remove
|
|
||||||
@Deprecated
|
|
||||||
public interface NamespaceDescriptorParent extends DeclarationDescriptor {
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user