Move utilities out of runtime modules
DescriptorUtils & DescriptorSubstitutor contained a lot of utilities that were used only in compiler & IDE. Move them closer to their usages
This commit is contained in:
+2
-5
@@ -32,10 +32,7 @@ import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
public class JavaToKotlinMethodMap {
|
||||
public static final JavaToKotlinMethodMap INSTANCE = new JavaToKotlinMethodMap();
|
||||
@@ -55,7 +52,7 @@ public class JavaToKotlinMethodMap {
|
||||
|
||||
List<FunctionDescriptor> result = Lists.newArrayList();
|
||||
|
||||
Set<ClassDescriptor> allSuperClasses = DescriptorUtils.getAllSuperClasses(containingClass);
|
||||
Set<ClassDescriptor> allSuperClasses = new HashSet<ClassDescriptor>(DescriptorUtils.getSuperclassDescriptors(containingClass));
|
||||
|
||||
String serializedMethod = JavaSignatureFormatter.getInstance().formatMethod(javaMethod);
|
||||
for (ClassData classData : classDatas) {
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import com.intellij.psi.impl.JavaConstantExpressionEvaluator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.evaluate.ConstantExpressionEvaluator;
|
||||
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant;
|
||||
import org.jetbrains.jet.lang.resolve.constants.ConstantsPackage;
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaField;
|
||||
@@ -36,7 +36,7 @@ public class JavaPropertyInitializerEvaluatorImpl implements JavaPropertyInitial
|
||||
if (evaluatedExpression != null) {
|
||||
return ConstantsPackage.createCompileTimeConstant(
|
||||
evaluatedExpression,
|
||||
DescriptorUtils.isPropertyCompileTimeConstant(descriptor),
|
||||
ConstantExpressionEvaluator.object$.isPropertyCompileTimeConstant(descriptor),
|
||||
false,
|
||||
true,
|
||||
descriptor.getType());
|
||||
|
||||
Reference in New Issue
Block a user