Migrate JavaClassResolver from PSI to JavaClass

Several places are still left and need special handling.  The overall behavior
of the resolver should not change in this commit (except for maybe different
small operations like creating names, fq-names, ...)
This commit is contained in:
Alexander Udalov
2013-07-30 17:21:17 +04:00
parent de54f7d732
commit 55af245867
26 changed files with 717 additions and 228 deletions
@@ -366,12 +366,7 @@ public class DescriptorUtils {
@NotNull
public static Name getClassObjectName(@NotNull Name className) {
return getClassObjectName(className.asString());
}
@NotNull
public static Name getClassObjectName(@NotNull String className) {
return Name.special("<class-object-for-" + className + ">");
return Name.special("<class-object-for-" + className.asString() + ">");
}
public static boolean isEnumClassObject(@NotNull DeclarationDescriptor descriptor) {
@@ -215,7 +215,7 @@ public class ResolveSession implements KotlinCodeAnalyzer {
// build descriptors for such class objects.
final JetClassLikeInfo classObjectInfo = parentClassDescriptor.getClassObjectInfo(classObject);
if (classObjectInfo != null) {
final Name name = DescriptorUtils.getClassObjectName(parentClassDescriptor.getName().asString());
final Name name = DescriptorUtils.getClassObjectName(parentClassDescriptor.getName());
return storageManager.compute(new Computable<LazyClassDescriptor>() {
@Override
public LazyClassDescriptor compute() {