Cleanup JavaElement model from methods used only in substitutor

Downcast everything used in JavaTypeSubstitutorImpl to *Impl, remove methods
from interfaces, inline/move some of them
This commit is contained in:
Alexander Udalov
2016-03-17 17:29:43 +03:00
parent 26bf0dca13
commit 291c713d8b
21 changed files with 106 additions and 297 deletions
@@ -50,9 +50,6 @@ public interface JavaClass extends JavaClassifier, JavaTypeParameterListOwner, J
@NotNull
Collection<JavaConstructor> getConstructors();
@NotNull
JavaClassifierType getDefaultType();
@NotNull
OriginKind getOriginKind();
@@ -20,17 +20,12 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.ReadOnly;
import java.util.Collection;
import java.util.List;
public interface JavaClassifierType extends JavaType, JavaAnnotationOwner {
@Nullable
JavaClassifier getClassifier();
@NotNull
@ReadOnly
Collection<JavaClassifierType> getSupertypes();
@NotNull
String getPresentableText();
@@ -16,9 +16,5 @@
package org.jetbrains.kotlin.load.java.structure;
import org.jetbrains.annotations.NotNull;
public interface JavaType {
@NotNull
JavaArrayType createArrayType();
}
@@ -17,7 +17,6 @@
package org.jetbrains.kotlin.load.java.structure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.ReadOnly;
import java.util.Collection;
@@ -26,13 +25,4 @@ public interface JavaTypeParameter extends JavaClassifier {
@NotNull
@ReadOnly
Collection<JavaClassifierType> getUpperBounds();
@Nullable
JavaTypeParameterListOwner getOwner();
@NotNull
JavaType getType();
@NotNull
JavaTypeProvider getTypeProvider();
}
@@ -1,33 +0,0 @@
/*
* Copyright 2010-2015 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.kotlin.load.java.structure;
import org.jetbrains.annotations.NotNull;
public interface JavaTypeProvider {
@NotNull
JavaType createJavaLangObjectType();
@NotNull
JavaWildcardType createUpperBoundWildcard(@NotNull JavaType bound);
@NotNull
JavaWildcardType createLowerBoundWildcard(@NotNull JavaType bound);
@NotNull
JavaWildcardType createUnboundedWildcard();
}
@@ -16,7 +16,6 @@
package org.jetbrains.kotlin.load.java.structure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface JavaWildcardType extends JavaType {
@@ -24,7 +23,4 @@ public interface JavaWildcardType extends JavaType {
JavaType getBound();
boolean isExtends();
@NotNull
JavaTypeProvider getTypeProvider();
}