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:
Alexander Udalov
2013-10-24 16:36:33 +04:00
parent e04f7c24fa
commit eb11a7dc88
22 changed files with 270 additions and 259 deletions
@@ -41,13 +41,15 @@ import org.jetbrains.jet.lang.psi.JetDeclaration;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.types.JetType;
import java.io.File;
import java.lang.reflect.Modifier;
import java.net.URL;
import java.net.URLClassLoader;
import static org.jetbrains.jet.lang.types.TypeUtils.getAllSupertypes;
@SuppressWarnings("JUnitTestCaseWithNoTests")
public class TestlibTest extends UsefulTestCase {
public static Test suite() {
@@ -123,8 +125,8 @@ public class TestlibTest extends UsefulTestCase {
BindingContext.DECLARATION_TO_DESCRIPTOR,
declaration);
for (ClassDescriptor superClass : DescriptorUtils.getAllSuperClasses(descriptor)) {
if (!"junit/framework/Test".equals(typeMapper.mapClass(superClass).getInternalName())) continue;
for (JetType superType : getAllSupertypes(descriptor.getDefaultType())) {
if (!"junit/framework/Test".equals(typeMapper.mapType(superType).getInternalName())) continue;
String name = typeMapper.mapClass(descriptor).getInternalName();